Search in sources :

Example 1 with Farbe

use of org.eclipse.xtext.testlanguages.referenceGrammar.Farbe in project xtext-core by eclipse.

the class SpielzeugImpl method basicSetFarbe.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetFarbe(Farbe newFarbe, NotificationChain msgs) {
    Farbe oldFarbe = farbe;
    farbe = newFarbe;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ReferenceGrammarPackage.SPIELZEUG__FARBE, oldFarbe, newFarbe);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Farbe(org.eclipse.xtext.testlanguages.referenceGrammar.Farbe) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with Farbe

use of org.eclipse.xtext.testlanguages.referenceGrammar.Farbe in project xtext-core by eclipse.

the class ReferenceGrammarTestLanguageSemanticSequencer 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 == ReferenceGrammarPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case ReferenceGrammarPackage.ERWACHSENER:
                sequence_Erwachsener(context, (Erwachsener) semanticObject);
                return;
            case ReferenceGrammarPackage.FAMILIE:
                sequence_Familie(context, (Familie) semanticObject);
                return;
            case ReferenceGrammarPackage.FARBE:
                sequence_Farbe(context, (Farbe) semanticObject);
                return;
            case ReferenceGrammarPackage.KIND:
                sequence_Kind(context, (Kind) semanticObject);
                return;
            case ReferenceGrammarPackage.SPIELPLATZ:
                sequence_Spielplatz(context, (Spielplatz) semanticObject);
                return;
            case ReferenceGrammarPackage.SPIELZEUG:
                sequence_Spielzeug(context, (Spielzeug) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Spielplatz(org.eclipse.xtext.testlanguages.referenceGrammar.Spielplatz) Action(org.eclipse.xtext.Action) Erwachsener(org.eclipse.xtext.testlanguages.referenceGrammar.Erwachsener) Farbe(org.eclipse.xtext.testlanguages.referenceGrammar.Farbe) Spielzeug(org.eclipse.xtext.testlanguages.referenceGrammar.Spielzeug) Kind(org.eclipse.xtext.testlanguages.referenceGrammar.Kind) Parameter(org.eclipse.xtext.Parameter) Familie(org.eclipse.xtext.testlanguages.referenceGrammar.Familie) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

Farbe (org.eclipse.xtext.testlanguages.referenceGrammar.Farbe)2 EPackage (org.eclipse.emf.ecore.EPackage)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Erwachsener (org.eclipse.xtext.testlanguages.referenceGrammar.Erwachsener)1 Familie (org.eclipse.xtext.testlanguages.referenceGrammar.Familie)1 Kind (org.eclipse.xtext.testlanguages.referenceGrammar.Kind)1 Spielplatz (org.eclipse.xtext.testlanguages.referenceGrammar.Spielplatz)1 Spielzeug (org.eclipse.xtext.testlanguages.referenceGrammar.Spielzeug)1