Search in sources :

Example 1 with AType

use of org.eclipse.xtext.generator.grammarAccess.ametamodel.asubpackage.AType in project xtext-core by eclipse.

the class AnotherTypeImpl method setRef.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setRef(AType newRef) {
    AType oldRef = ref;
    ref = newRef;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, SubsubpackagePackage.ANOTHER_TYPE__REF, oldRef, ref));
}
Also used : AType(org.eclipse.xtext.generator.grammarAccess.ametamodel.asubpackage.AType) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with AType

use of org.eclipse.xtext.generator.grammarAccess.ametamodel.asubpackage.AType in project xtext-core by eclipse.

the class GrammarAccessTestLanguageSemanticSequencer 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 == AsubpackagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case AsubpackagePackage.AMODEL:
                sequence_Root(context, (AModel) semanticObject);
                return;
            case AsubpackagePackage.ATYPE:
                sequence_AType(context, (AType) semanticObject);
                return;
        }
    else if (epackage == SubsubpackagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case SubsubpackagePackage.ANOTHER_TYPE:
                sequence_AnotherType(context, (AnotherType) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : AType(org.eclipse.xtext.generator.grammarAccess.ametamodel.asubpackage.AType) ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) AModel(org.eclipse.xtext.generator.grammarAccess.ametamodel.asubpackage.AModel) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

AType (org.eclipse.xtext.generator.grammarAccess.ametamodel.asubpackage.AType)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 AModel (org.eclipse.xtext.generator.grammarAccess.ametamodel.asubpackage.AModel)1