Search in sources :

Example 1 with Statemachine

use of org.eclipse.xtext.testlanguages.fowlerdsl.Statemachine in project xtext-core by eclipse.

the class FowlerDslTestLanguageSemanticSequencer 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 == FowlerdslPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case FowlerdslPackage.COMMAND:
                sequence_Command(context, (Command) semanticObject);
                return;
            case FowlerdslPackage.EVENT:
                sequence_Event(context, (Event) semanticObject);
                return;
            case FowlerdslPackage.STATE:
                sequence_State(context, (State) semanticObject);
                return;
            case FowlerdslPackage.STATEMACHINE:
                sequence_Statemachine(context, (Statemachine) semanticObject);
                return;
            case FowlerdslPackage.TRANSITION:
                sequence_Transition(context, (Transition) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Statemachine(org.eclipse.xtext.testlanguages.fowlerdsl.Statemachine) Action(org.eclipse.xtext.Action) Command(org.eclipse.xtext.testlanguages.fowlerdsl.Command) State(org.eclipse.xtext.testlanguages.fowlerdsl.State) Transition(org.eclipse.xtext.testlanguages.fowlerdsl.Transition) Parameter(org.eclipse.xtext.Parameter) Event(org.eclipse.xtext.testlanguages.fowlerdsl.Event) 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 Command (org.eclipse.xtext.testlanguages.fowlerdsl.Command)1 Event (org.eclipse.xtext.testlanguages.fowlerdsl.Event)1 State (org.eclipse.xtext.testlanguages.fowlerdsl.State)1 Statemachine (org.eclipse.xtext.testlanguages.fowlerdsl.Statemachine)1 Transition (org.eclipse.xtext.testlanguages.fowlerdsl.Transition)1