public class EMFPatternLanguageValidator extends AbstractEMFPatternLanguageValidator implements IIssueCallback
org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper, 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
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIES
Constructor and Description |
---|
EMFPatternLanguageValidator() |
Modifier and Type | Method and Description |
---|---|
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 VIATRA Query. |
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 |
checkParametersNamed(Pattern pattern) |
void |
checkPatternImports(VQLImportSection section) |
void |
checkPatternName(Pattern pattern) |
void |
checkPrivatePatternUsage(Pattern pattern) |
void |
checkReferredPackages(ReferenceType type) |
void |
checkVariableType(Variable variable) |
protected org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper |
createMethodWrapper(org.eclipse.xtext.validation.AbstractDeclarativeValidator instanceToUse,
java.lang.reflect.Method method) |
void |
error(java.lang.String message,
org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.String code,
java.lang.String... issueData) |
protected java.util.List<org.eclipse.emf.ecore.EPackage> |
getEPackages() |
void |
warning(java.lang.String message,
org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.String code,
java.lang.String... issueData) |
addImportUnusedIssues, canonicalName, checkAssignment, checkAssignment, checkAssignment, checkAssignment, checkAssignment, checkCast, checkCasts, checkCatchClausesOrder, checkClosureParameterTypes, checkClosureParams, checkConflicts, checkConstructorArgumentsAreValid, checkDelegateConstructorIsFirst, checkDeprecated, checkDeprecated, checkDeprecated, checkDeprecated, checkDeprecated, checkDeprecated, checkDuplicatedCases, checkExplicitOperationCall, checkExplicitOperationCall, checkExplicitOperationCall, checkFinalFieldInitialization, checkImports, checkIncompleteCasesOnEnum, checkInitializationRec, checkInnerExpressions, checkInstanceOf, checkInstanceOfOrder, checkIsValidConstructorArgument, checkLocalUsageOfDeclared, checkLocalUsageOfSwitchParameter, checkNoCircularConstructorCall, checkNoForwardReferences, checkNoJavaStyleTypeCasting, checkNoJavaStyleTypeCasting, checkNumberFormat, checkOperandTypesForTripleEquals, checkPrimitiveComparedToNull, checkRedundantCase, checkReferInvalidTypes, checkReferInvalidTypes, checkReferInvalidTypes, checkReturn, checkTypeArguments, checkTypeArguments, checkTypeGuards, checkTypeGuardsOrder, checkTypeLiteral, checkTypeParameterConstraintIsValid, checkTypeParameterNotUsedInStaticContext, checkTypeReferenceIsNotVoid, checkTypeReferenceIsNotVoid, checkTypes, checkVariableDeclaration, checkVariableIsNotInferredAsVoid, containsTypeArgs, doCheckTypeParameterForwardReference, ensureNotPrimitiveNorWildcard, getActualType, getActualType, getActualType, getExpectedType, getExpressionHelper, getFirstLeafNode, getLogicalContainerProvider, getNameOfTypes, getNode, getReferInvalidTypeMessage, getServices, hasConstructorCallWithThis, isFinal, isHandled, isHidden, isInitialized, isInterface, isLocalClassSemantics, isLocallyUsed, isLocalType, isPrimitiveVoid, isSemicolon, isStaticContext, isTripleEqualsOperation, isValueExpectedRecursive, isXExpressionInsideBlock, memberOfTypeHierarchy, mustBeJavaStatementExpression, populateMaps, reportFieldAlreadyInitialized, reportUninitializedField, reportUninitializedField, toLightweightTypeReference, toLightweightTypeReference
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, addIssue, addIssue, addIssue, addIssue, addIssue, addIssueToState, checkDone, checkIsFromCurrentlyCheckedResource, createDiagnostic, createDiagnostic, error, error, error, error, error, error, error, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getIssueSeverities, getMessageAcceptor, guard, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning
protected org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper createMethodWrapper(org.eclipse.xtext.validation.AbstractDeclarativeValidator instanceToUse, java.lang.reflect.Method method)
createMethodWrapper
in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
protected java.util.List<org.eclipse.emf.ecore.EPackage> getEPackages()
getEPackages
in class AbstractEMFPatternLanguageValidator
public void checkDuplicatePackageImports(PatternModel patternModel)
public void checkParametersNamed(Pattern pattern)
public void checkEnumValues(EnumValue value)
public void checkVariableType(Variable variable)
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 VIATRA Query. This is a warning, since we only see well-behaving
extensions in the host.pathExpressionConstraint
- public void checkPatternName(Pattern pattern)
public void checkReferredPackages(ReferenceType type)
public void checkPatternImports(VQLImportSection section)
public void checkPrivatePatternUsage(Pattern pattern)
public void warning(java.lang.String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String code, java.lang.String... issueData)
warning
in interface IIssueCallback
warning
in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
public void error(java.lang.String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String code, java.lang.String... issueData)
error
in interface IIssueCallback
error
in class org.eclipse.xtext.validation.AbstractDeclarativeValidator