Search in sources :

Example 1 with TestOptional

use of org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestOptional in project xtext-core by eclipse.

the class TransientValuesTestSemanticSequencer 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 == TransientvaluestestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case TransientvaluestestPackage.TEST_LIST:
                sequence_TestList(context, (TestList) semanticObject);
                return;
            case TransientvaluestestPackage.TEST_OPTIONAL:
                sequence_TestOptional(context, (TestOptional) semanticObject);
                return;
            case TransientvaluestestPackage.TEST_REQUIRED:
                sequence_TestRequired(context, (TestRequired) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) TestRequired(org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestRequired) Action(org.eclipse.xtext.Action) Parameter(org.eclipse.xtext.Parameter) TestOptional(org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestOptional) TestList(org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestList) 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 TestList (org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestList)1 TestOptional (org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestOptional)1 TestRequired (org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestRequired)1