Search in sources :

Example 1 with ModelElement

use of org.eclipse.xtext.parser.antlr.bug289524ExTest.ModelElement in project xtext-core by eclipse.

the class Bug289524ExTestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == Bug289524ExTestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug289524ExTestPackage.CONTAINED:
                sequence_Contained(context, (Contained) semanticObject);
                return;
            case Bug289524ExTestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case Bug289524ExTestPackage.MODEL_ELEMENT:
                sequence_ModelElement(context, (ModelElement) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : Contained(org.eclipse.xtext.parser.antlr.bug289524ExTest.Contained) ParserRule(org.eclipse.xtext.ParserRule) ModelElement(org.eclipse.xtext.parser.antlr.bug289524ExTest.ModelElement) Action(org.eclipse.xtext.Action) Model(org.eclipse.xtext.parser.antlr.bug289524ExTest.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

EPackage (org.eclipse.emf.ecore.EPackage)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Contained (org.eclipse.xtext.parser.antlr.bug289524ExTest.Contained)1 Model (org.eclipse.xtext.parser.antlr.bug289524ExTest.Model)1 ModelElement (org.eclipse.xtext.parser.antlr.bug289524ExTest.ModelElement)1