org.eclipse.gmt.umlx.cst.parser
Class AbstractErrorHandler

java.lang.Object
  extended by org.eclipse.gmt.umlx.cst.parser.AbstractErrorHandler
All Implemented Interfaces:
lpg.lpgjavaruntime.ParseErrorCodes, ErrorHandler, LexerErrorHandler, ParserErrorHandler, SemanticErrorHandler
Direct Known Subclasses:
ErrorStringHandler

public abstract class AbstractErrorHandler
extends java.lang.Object
implements ErrorHandler, lpg.lpgjavaruntime.ParseErrorCodes


Field Summary
 
Fields inherited from interface org.eclipse.gmt.umlx.cst.parser.ErrorHandler
errorMessages
 
Fields inherited from interface lpg.lpgjavaruntime.ParseErrorCodes
BEFORE_CODE, DELETION_CODE, EOF_CODE, ERROR_CODE, errorMsgText, INSERTION_CODE, INVALID_CODE, INVALID_TOKEN_CODE, LEX_ERROR_CODE, MERGE_CODE, MISPLACED_CODE, SCOPE_CODE, SECONDARY_CODE, SUBSTITUTION_CODE
 
Method Summary
 void flush(org.eclipse.core.runtime.IProgressMonitor monitor)
          Flush all errors to their recipient.
 java.lang.String formatClass(java.lang.Object object)
           
 java.lang.String formatEClassName(org.eclipse.emf.ecore.EObject eObject)
           
 java.lang.String formatName(java.lang.Object object)
           
 java.lang.String formatPath(java.util.List<java.lang.String> pathName)
           
 java.lang.String formatPath(java.util.List<java.lang.String> pathName, java.lang.String name)
           
 java.lang.String formatString(java.lang.String name)
           
 java.lang.String formatType(java.lang.Object type)
           
 int getErrorReportLineOffset()
           
 AbstractParser getParser()
           
 AbstractLPGParser getPrsStream()
           
 void setErrorReportLineOffset(int offset)
          Sets the line offset for reporting errors.
 void setParser(AbstractParser parser)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.cst.parser.ParserErrorHandler
parserError
 
Methods inherited from interface org.eclipse.gmt.umlx.cst.parser.LexerErrorHandler
lexerError
 
Methods inherited from interface org.eclipse.gmt.umlx.cst.parser.SemanticErrorHandler
semanticError
 

Method Detail

flush

public void flush(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: ErrorHandler
Flush all errors to their recipient. This method allows handlers to batch up error reports into a single composite report or transaction.

Specified by:
flush in interface ErrorHandler

formatClass

public java.lang.String formatClass(java.lang.Object object)
Specified by:
formatClass in interface ErrorHandler

formatEClassName

public java.lang.String formatEClassName(org.eclipse.emf.ecore.EObject eObject)
Specified by:
formatEClassName in interface ErrorHandler

formatName

public java.lang.String formatName(java.lang.Object object)
Specified by:
formatName in interface ErrorHandler

formatPath

public java.lang.String formatPath(java.util.List<java.lang.String> pathName)
Specified by:
formatPath in interface ErrorHandler

formatPath

public java.lang.String formatPath(java.util.List<java.lang.String> pathName,
                                   java.lang.String name)
Specified by:
formatPath in interface ErrorHandler

formatString

public java.lang.String formatString(java.lang.String name)
Specified by:
formatString in interface ErrorHandler

formatType

public java.lang.String formatType(java.lang.Object type)
Specified by:
formatType in interface ErrorHandler

getErrorReportLineOffset

public int getErrorReportLineOffset()

getParser

public AbstractParser getParser()

getPrsStream

public AbstractLPGParser getPrsStream()

setErrorReportLineOffset

public void setErrorReportLineOffset(int offset)
Sets the line offset for reporting errors. Eg. if an error occured at line 2, but the offset was set to -1, then line 1 will be reported.

Parameters:
offset -

setParser

public void setParser(AbstractParser parser)
Specified by:
setParser in interface ErrorHandler