public class EMFPatternLanguageJavaValidator extends AbstractEMFPatternLanguageJavaValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator.State, org.eclipse.xtext.validation.AbstractDeclarativeValidator.StateAccess
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate
ANNOTATION_PARAMETER_TYPE_ERROR, DUPLICATE_PATTERN_DEFINITION_MESSAGE, DUPLICATE_VARIABLE_MESSAGE, MISSING_ANNOTATION_ATTRIBUTE, RECURSIVE_PATTERN_CALL, TRANSITIVE_CLOSURE_ARITY_IN_PATTERNCALL, TRANSITIVE_CLOSURE_ONLY_IN_POSITIVE_COMPOSITION, UNKNOWN_ANNOTATION_ATTRIBUTE, UNUSED_PRIVATE_PATTERN_MESSAGE
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIES
Constructor and Description |
---|
EMFPatternLanguageJavaValidator() |
Modifier and Type | Method and Description |
---|---|
void |
checkClassPath(PatternModel modelFile) |
void |
checkDuplicatePackageImports(PatternModel patternModel) |
void |
checkEnumValues(EnumValue value) |
void |
checkForCartesianProduct(PatternBody patternBody)
A validator for cartesian products (isolated constraints) in pattern bodies.
|
void |
checkForNotWellbehavingDerivedFeatureInPathExpressions(PathExpressionConstraint pathExpressionConstraint)
This validator looks up all
EStructuralFeature used in a PathExpressionConstraint and reports a
warning on each that is not representable by EMF-IncQuery. |
void |
checkForWrongLiteralAndComputationValuesInCompareConstraints(CompareConstraint compareConstraint)
This validator checks if the literal or computational values match the other side's type in a compare constraint
(equality/inequality).
|
void |
checkForWrongLiteralAndComputationValuesInPathExpressionConstraints(PathExpressionConstraint pathExpressionConstraint)
This validator checks if the literal or computational values match the path expression's type.
|
void |
checkForWrongLiteralAndComputationValuesInPatternCalls(PatternCall patternCall)
This validator checks if the literal or computational values match the pattern call's type.
|
void |
checkForWrongVariablesInXExpressions(CheckConstraint checkConstraint)
This validator looks up all variables in the
CheckConstraint and reports an error if one them is not an
EDataType instance. |
void |
checkForWrongVariablesInXExpressions(FunctionEvaluationValue eval)
This validator looks up all variables in the
FunctionEvaluationValue and reports an error if one them is not an
EDataType instance. |
void |
checkMissingParameterTypes(Variable variable) |
void |
checkPackageImportGeneratedCode(PackageImport packageImport) |
void |
checkParametersNamed(Pattern pattern) |
void |
checkPatternImports(XImportSection section) |
void |
checkPatternParametersType(Pattern pattern)
The parameter's type must be the same or more specific than the type inferred from the pattern's body.
|
void |
checkPatternVariablesType(Pattern pattern)
A variable's type can come from different sources: parameter's type definition, type definitions in the pattern
bodies or calculated from path expression constraints or find calls.
|
void |
checkReferredPackages(ReferenceType type) |
checkAnnotation, checkApplicabilityOfTransitiveClosureInPatternCall, checkCompareConstraints, checkForImpureJavaCallsInCheckConstraints, checkForImpureJavaCallsInEvalExpressions, checkPackageDeclaration, checkPatternBody, checkPatternCallParameters, checkPatternParameters, checkPatterns, checkPrivatePatternCall, checkPrivatePatternUsage, checkRecursivePatternCall, checkReturnTypeOfCheckConstraints, checkVariableNames, checkVariableUsageCounters, error, isNamedSingleUse, isUnnamedSingleUseVariable, warning
checkAssignment, checkAssignment, checkAssignment, checkCasts, checkCatchClausesOrder, checkClosureParameterTypes, checkClosureParams, checkConstructorArgumentsAreValid, checkDelegateConstructorIsFirst, checkDeprecated, checkDeprecated, checkDeprecated, checkDeprecated, checkDeprecated, checkDuplicatedCases, checkExplicitOperationCall, checkExplicitOperationCall, checkExplicitOperationCall, checkImports, checkIncompleteCasesOnEnum, checkInnerExpressions, checkInstanceOf, checkInstanceOfOrder, checkLocalUsageOfDeclared, checkLocalUsageOfSwitchParameter, checkNoCircularConstructorCall, checkNoForwardReferences, checkNoJavaStyleTypeCasting, checkOperandTypesForTripleEquals, checkPrimitiveComparedToNull, checkRedundantCase, checkReturn, checkTypeArguments, checkTypeArguments, checkTypeGuards, checkTypeGuardsOrder, checkTypeLiteral, checkTypeParameterConstraintIsValid, checkTypeParameterNotUsedInStaticContext, checkTypeReferenceIsNotVoid, checkTypeReferenceIsNotVoid, checkTypes, checkVariableDeclaration, checkVariableIsNotInferredAsVoid, doCheckTypeParameterForwardReference
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, getMessageAcceptor, setInjector, setMessageAcceptor
public void checkDuplicatePackageImports(PatternModel patternModel)
public void checkPackageImportGeneratedCode(PackageImport packageImport)
public void checkParametersNamed(Pattern pattern)
public void checkEnumValues(EnumValue value)
public void checkPatternParametersType(Pattern pattern)
pattern
- public void checkPatternVariablesType(Pattern pattern)
pattern
- public void checkForCartesianProduct(PatternBody patternBody)
patternBody
- public void checkForWrongLiteralAndComputationValuesInCompareConstraints(CompareConstraint compareConstraint)
compareConstraint
- public void checkForWrongLiteralAndComputationValuesInPathExpressionConstraints(PathExpressionConstraint pathExpressionConstraint)
pathExpressionConstraint
- public void checkForWrongLiteralAndComputationValuesInPatternCalls(PatternCall patternCall)
patternCall
- public void checkForWrongVariablesInXExpressions(CheckConstraint checkConstraint)
CheckConstraint
and reports an error if one them is not an
EDataType
instance. We do not allow arbitrary EMF elements in, so the checks are less likely to have
side-effects.public void checkForWrongVariablesInXExpressions(FunctionEvaluationValue eval)
FunctionEvaluationValue
and reports an error if one them is not an
EDataType
instance. We do not allow arbitrary EMF elements in, so the checks are less likely to have
side-effects.public void checkForNotWellbehavingDerivedFeatureInPathExpressions(PathExpressionConstraint pathExpressionConstraint)
EStructuralFeature
used in a PathExpressionConstraint
and reports a
warning on each that is not representable by EMF-IncQuery. This is a warning, since we only see well-behaving
extensions in the host.pathExpressionConstraint
- public void checkReferredPackages(ReferenceType type)
public void checkPatternImports(XImportSection section)
public void checkMissingParameterTypes(Variable variable)
public void checkClassPath(PatternModel modelFile)