Package org.eclipse.xtext.xtext
Class PredicateUsesUnorderedGroupInspector
- java.lang.Object
-
- org.eclipse.emf.ecore.util.Switch<T>
-
- org.eclipse.xtext.util.XtextSwitch<java.lang.Boolean>
-
- org.eclipse.xtext.xtext.PredicateUsesUnorderedGroupInspector
-
- All Implemented Interfaces:
ValidationMessageAcceptor
public class PredicateUsesUnorderedGroupInspector extends XtextSwitch<java.lang.Boolean> implements ValidationMessageAcceptor
Checks whether apredicateuses anunordered group.
-
-
Field Summary
-
Fields inherited from class org.eclipse.xtext.util.XtextSwitch
modelPackage
-
Fields inherited from interface org.eclipse.xtext.validation.ValidationMessageAcceptor
INSIGNIFICANT_INDEX
-
-
Constructor Summary
Constructors Constructor Description PredicateUsesUnorderedGroupInspector(ValidationMessageAcceptor validationMessageAcceptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)Annotate a range of the resource with an error.voidacceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)Annotate an instance, a feature value, or all feature values with an error.voidacceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)Annotate a range of the resource with an info message..voidacceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)Annotate an instance, a feature value, or all feature values with an info message.voidacceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)Annotate a range of the resource with a warning.voidacceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)Annotate an instance, a feature value, or all feature values with a warning.java.lang.BooleancaseAbstractElement(AbstractElement object)Returns the result of interpreting the object as an instance of 'Abstract Element'.java.lang.BooleancaseAssignment(Assignment object)Returns the result of interpreting the object as an instance of 'Assignment'.java.lang.BooleancaseCompoundElement(CompoundElement object)Returns the result of interpreting the object as an instance of 'Compound Element'.java.lang.BooleancaseCrossReference(CrossReference object)Returns the result of interpreting the object as an instance of 'Cross Reference'.java.lang.BooleancaseParserRule(ParserRule object)Returns the result of interpreting the object as an instance of 'Parser Rule'.java.lang.BooleancaseRuleCall(RuleCall object)Returns the result of interpreting the object as an instance of 'Rule Call'.java.lang.BooleancaseUnorderedGroup(UnorderedGroup object)Returns the result of interpreting the object as an instance of 'Unordered Group'.voidcreateErrorMessages(UnorderedGroup object)voidinspect(Grammar grammar)protected booleanshouldTraverse(AbstractElement object)-
Methods inherited from class org.eclipse.xtext.util.XtextSwitch
caseAbstractMetamodelDeclaration, caseAbstractNegatedToken, caseAbstractRule, caseAction, caseAlternatives, caseAnnotation, caseCharacterRange, caseCompositeCondition, caseCondition, caseConjunction, caseDisjunction, caseEnumLiteralDeclaration, caseEnumRule, caseEOF, caseGeneratedMetamodel, caseGrammar, caseGroup, caseKeyword, caseLiteralCondition, caseNamedArgument, caseNegatedToken, caseNegation, caseParameter, caseParameterReference, caseReferencedMetamodel, caseTerminalRule, caseTypeRef, caseUntilToken, caseWildcard, defaultCase, doSwitch, isSwitchFor
-
-
-
-
Constructor Detail
-
PredicateUsesUnorderedGroupInspector
public PredicateUsesUnorderedGroupInspector(ValidationMessageAcceptor validationMessageAcceptor)
-
-
Method Detail
-
inspect
public void inspect(Grammar grammar)
-
caseAbstractElement
public java.lang.Boolean caseAbstractElement(AbstractElement object)
Description copied from class:XtextSwitchReturns the result of interpreting the object as an instance of 'Abstract Element'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseAbstractElementin classXtextSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Abstract Element'.
- See Also:
doSwitch(EObject)
-
caseAssignment
public java.lang.Boolean caseAssignment(Assignment object)
Description copied from class:XtextSwitchReturns the result of interpreting the object as an instance of 'Assignment'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseAssignmentin classXtextSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Assignment'.
- See Also:
doSwitch(EObject)
-
shouldTraverse
protected boolean shouldTraverse(AbstractElement object)
-
caseCrossReference
public java.lang.Boolean caseCrossReference(CrossReference object)
Description copied from class:XtextSwitchReturns the result of interpreting the object as an instance of 'Cross Reference'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseCrossReferencein classXtextSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Cross Reference'.
- See Also:
doSwitch(EObject)
-
caseCompoundElement
public java.lang.Boolean caseCompoundElement(CompoundElement object)
Description copied from class:XtextSwitchReturns the result of interpreting the object as an instance of 'Compound Element'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseCompoundElementin classXtextSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Compound Element'.
- See Also:
doSwitch(EObject)
-
caseUnorderedGroup
public java.lang.Boolean caseUnorderedGroup(UnorderedGroup object)
Description copied from class:XtextSwitchReturns the result of interpreting the object as an instance of 'Unordered Group'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseUnorderedGroupin classXtextSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Unordered Group'.
- See Also:
doSwitch(EObject)
-
caseRuleCall
public java.lang.Boolean caseRuleCall(RuleCall object)
Description copied from class:XtextSwitchReturns the result of interpreting the object as an instance of 'Rule Call'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseRuleCallin classXtextSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Rule Call'.
- See Also:
doSwitch(EObject)
-
caseParserRule
public java.lang.Boolean caseParserRule(ParserRule object)
Description copied from class:XtextSwitchReturns the result of interpreting the object as an instance of 'Parser Rule'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseParserRulein classXtextSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Parser Rule'.
- See Also:
doSwitch(EObject)
-
createErrorMessages
public void createErrorMessages(UnorderedGroup object)
-
acceptError
public void acceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)Description copied from interface:ValidationMessageAcceptorAnnotate an instance, a feature value, or all feature values with an error.- Specified by:
acceptErrorin interfaceValidationMessageAcceptor- Parameters:
message- the error message. May not benull.object- the object or the feature holder. May not benull.feature- the feature ornullif the complete instance should be annotated.index- the index of the erroneous value or-1if all values are considered to be invalid. The index is ignored if the feature is null or the feature is a single value feature.code- the optional issue code.issueData- the optional issue data.
-
acceptWarning
public void acceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)Description copied from interface:ValidationMessageAcceptorAnnotate an instance, a feature value, or all feature values with a warning.- Specified by:
acceptWarningin interfaceValidationMessageAcceptor- Parameters:
message- the warning message. May not benull.object- the object or the feature holder. May not benull.feature- the feature ornullif the complete instance should be annotated.index- the index of the relevant value or-1if all values are considered to be affected. The index is ignored if the feature is null or the feature is a single value feature.code- the optional issue code.issueData- the optional issue data.
-
acceptError
public void acceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)Description copied from interface:ValidationMessageAcceptorAnnotate a range of the resource with an error.- Specified by:
acceptErrorin interfaceValidationMessageAcceptor- Parameters:
message- the error message. May not benull.offset- the absolute offset in the resource.length- the length of the erroneous range.code- the optional issue code.issueData- the optional issue data.
-
acceptWarning
public void acceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)Description copied from interface:ValidationMessageAcceptorAnnotate a range of the resource with a warning.- Specified by:
acceptWarningin interfaceValidationMessageAcceptor- Parameters:
message- the warning message. May not benull.offset- the absolute offset in the resource.length- the length of the invalid range.code- the optional issue code.issueData- the optional issue data.
-
acceptInfo
public void acceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)Description copied from interface:ValidationMessageAcceptorAnnotate an instance, a feature value, or all feature values with an info message.- Specified by:
acceptInfoin interfaceValidationMessageAcceptor- Parameters:
message- the info message. May not benull.object- the object or the feature holder. May not benull.feature- the feature ornullif the complete instance should be annotated.index- the index of the interesting value or-1if all values are considered to be interesting. The index is ignored if the feature is null or the feature is a single value feature.code- the optional issue code.issueData- the optional issue data.
-
acceptInfo
public void acceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)Description copied from interface:ValidationMessageAcceptorAnnotate a range of the resource with an info message..- Specified by:
acceptInfoin interfaceValidationMessageAcceptor- Parameters:
message- the info message. May not benull.offset- the absolute offset in the resource.length- the length of the annotated range.code- the optional issue code.issueData- the optional issue data.
-
-