Search in sources :

Example 1 with ReducibleComposite

use of org.eclipse.xtext.testlanguages.testLang.ReducibleComposite in project xtext-core by eclipse.

the class TestLanguageSemanticSequencer 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 == TestLangPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case TestLangPackage.CHOICE_ELEMENT:
                sequence_ChoiceRule(context, (ChoiceElement) semanticObject);
                return;
            case TestLangPackage.MODEL:
                sequence_EntryRule(context, (Model) semanticObject);
                return;
            case TestLangPackage.REDUCIBLE_COMPOSITE:
                sequence_ReducibleRule(context, (ReducibleComposite) semanticObject);
                return;
            case TestLangPackage.TERMINAL_ELEMENT:
                sequence_TerminalRule(context, (TerminalElement) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : TerminalElement(org.eclipse.xtext.testlanguages.testLang.TerminalElement) ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) ChoiceElement(org.eclipse.xtext.testlanguages.testLang.ChoiceElement) Model(org.eclipse.xtext.testlanguages.testLang.Model) Parameter(org.eclipse.xtext.Parameter) ReducibleComposite(org.eclipse.xtext.testlanguages.testLang.ReducibleComposite) 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 ChoiceElement (org.eclipse.xtext.testlanguages.testLang.ChoiceElement)1 Model (org.eclipse.xtext.testlanguages.testLang.Model)1 ReducibleComposite (org.eclipse.xtext.testlanguages.testLang.ReducibleComposite)1 TerminalElement (org.eclipse.xtext.testlanguages.testLang.TerminalElement)1