Search in sources :

Example 1 with AnotherSuperMain

use of org.eclipse.xtext.generator.ecore.subPackage.AnotherSuperMain in project xtext-core by eclipse.

the class SubTestLanguageSemanticSequencer 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 == SubPackagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case SubPackagePackage.ANOTHER_SUPER_MAIN:
                sequence_AnotherSuperMain(context, (AnotherSuperMain) semanticObject);
                return;
            case SubPackagePackage.SUB_MAIN:
                sequence_SubMain(context, (SubMain) semanticObject);
                return;
        }
    else if (epackage == SuperPackagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case SuperPackagePackage.SUPER_MAIN:
                sequence_SuperMain(context, (SuperMain) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Parameter(org.eclipse.xtext.Parameter) SubMain(org.eclipse.xtext.generator.ecore.subPackage.SubMain) AnotherSuperMain(org.eclipse.xtext.generator.ecore.subPackage.AnotherSuperMain) EPackage(org.eclipse.emf.ecore.EPackage)

Example 2 with AnotherSuperMain

use of org.eclipse.xtext.generator.ecore.subPackage.AnotherSuperMain in project xtext-core by eclipse.

the class SubMainImpl method basicSetAnother.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetAnother(AnotherSuperMain newAnother, NotificationChain msgs) {
    AnotherSuperMain oldAnother = another;
    another = newAnother;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SubPackagePackage.SUB_MAIN__ANOTHER, oldAnother, newAnother);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) AnotherSuperMain(org.eclipse.xtext.generator.ecore.subPackage.AnotherSuperMain)

Aggregations

AnotherSuperMain (org.eclipse.xtext.generator.ecore.subPackage.AnotherSuperMain)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 SubMain (org.eclipse.xtext.generator.ecore.subPackage.SubMain)1