org.eclipse.ocl.parser
Class OCLProblemHandler
java.lang.Object
org.eclipse.ocl.lpg.AbstractProblemHandler
org.eclipse.ocl.parser.OCLProblemHandler
- All Implemented Interfaces:
- lpg.runtime.ParseErrorCodes, ProblemHandler
public class OCLProblemHandler
- extends AbstractProblemHandler
The OCLProblemHandler
accumulates a DiagnosticChain
of
problems.
Fields inherited from interface lpg.runtime.ParseErrorCodes |
BEFORE_CODE, DELETION_CODE, EOF_CODE, ERROR_CODE, ERROR_RULE_ERROR_CODE, ERROR_RULE_WARNING_CODE, errorMsgText, INSERTION_CODE, INVALID_CODE, INVALID_TOKEN_CODE, LEX_ERROR_CODE, MERGE_CODE, MISPLACED_CODE, NO_MESSAGE_CODE, SCOPE_CODE, SECONDARY_CODE, SUBSTITUTION_CODE |
Method Summary |
void |
beginParse()
This default implementation does nothing. |
void |
beginValidation()
This default implementation does nothing. |
void |
clearDiagnostic()
|
org.eclipse.emf.common.util.Diagnostic |
getDiagnostic()
|
protected lpg.runtime.IPrsStream |
getIPrsStream()
|
void |
handleProblem(ProblemHandler.Severity problemSeverity,
ProblemHandler.Phase processingPhase,
java.lang.String problemMessage,
java.lang.String processingContext,
int startOffset,
int endOffset)
Implements the interface, invoking addProblem with a line comprising
processingPhase-problemSeverity in processingContext; lineNumber : problemMessage . |
void |
parserProblem(ProblemHandler.Severity problemSeverity,
java.lang.String problemMessage,
java.lang.String processingContext,
int startOffset,
int endOffset)
Convenience method typically invoking handleProblem
with a parserProblem processing phase. |
Methods inherited from class org.eclipse.ocl.lpg.AbstractProblemHandler |
addProblem, analyzerProblem, endParse, endValidation, flush, getErrorReportLineOffset, getParser, lexerProblem, setErrorReportLineOffset, setParser, utilityProblem, validatorProblem |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OCLProblemHandler
public OCLProblemHandler(AbstractParser parser)
handleProblem
public void handleProblem(ProblemHandler.Severity problemSeverity,
ProblemHandler.Phase processingPhase,
java.lang.String problemMessage,
java.lang.String processingContext,
int startOffset,
int endOffset)
- Description copied from class:
AbstractProblemHandler
- Implements the interface, invoking
addProblem
with a line comprising
processingPhase-problemSeverity in processingContext; lineNumber : problemMessage
.
- Specified by:
handleProblem
in interface ProblemHandler
- Overrides:
handleProblem
in class AbstractProblemHandler
- Parameters:
problemSeverity
- text describing the problem severity (e.g. errorSeverity
)processingPhase
- optional text describing the processing phase (e.g. analyzerProblem
)problemMessage
- message describing the problemprocessingContext
- optional message describing the reporting context (e.g. "PathNameCS"
)startOffset
- (inclusive) index of first source character influencing the problem, -ve if unknownendOffset
- (exclusive) index of last source character influencing the problem, -ve if unknown
getDiagnostic
public org.eclipse.emf.common.util.Diagnostic getDiagnostic()
beginParse
public void beginParse()
- Description copied from class:
AbstractProblemHandler
- This default implementation does nothing.
- Specified by:
beginParse
in interface ProblemHandler
- Overrides:
beginParse
in class AbstractProblemHandler
beginValidation
public void beginValidation()
- Description copied from class:
AbstractProblemHandler
- This default implementation does nothing.
- Specified by:
beginValidation
in interface ProblemHandler
- Overrides:
beginValidation
in class AbstractProblemHandler
clearDiagnostic
public void clearDiagnostic()
parserProblem
public void parserProblem(ProblemHandler.Severity problemSeverity,
java.lang.String problemMessage,
java.lang.String processingContext,
int startOffset,
int endOffset)
- Description copied from interface:
ProblemHandler
- Convenience method typically invoking
handleProblem
with a parserProblem
processing phase.
- Specified by:
parserProblem
in interface ProblemHandler
- Overrides:
parserProblem
in class AbstractProblemHandler
- Parameters:
problemSeverity
- text describing the problem severityproblemMessage
- message describing the problemprocessingContext
- optional message describing the reporting context (e.g. "PathNameCS"
)startOffset
- (inclusive) index of first source character influencing the problem, -ve if unknownendOffset
- (exclusive) index of last source character influencing the problem, -ve if unknown
getIPrsStream
protected lpg.runtime.IPrsStream getIPrsStream()
- Since:
- 3.0