Search in sources :

Example 1 with Child2

use of org.eclipse.xtext.valueconverter.bug250313.Child2 in project xtext-core by eclipse.

the class Bug250313SemanticSequencer 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 == Bug250313Package.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug250313Package.CHILD1:
                sequence_Child1(context, (Child1) semanticObject);
                return;
            case Bug250313Package.CHILD2:
                sequence_Child2(context, (Child2) semanticObject);
                return;
            case Bug250313Package.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Model(org.eclipse.xtext.valueconverter.bug250313.Model) Parameter(org.eclipse.xtext.Parameter) Child2(org.eclipse.xtext.valueconverter.bug250313.Child2) Child1(org.eclipse.xtext.valueconverter.bug250313.Child1) 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 Child1 (org.eclipse.xtext.valueconverter.bug250313.Child1)1 Child2 (org.eclipse.xtext.valueconverter.bug250313.Child2)1 Model (org.eclipse.xtext.valueconverter.bug250313.Model)1