Search in sources :

Example 1 with DomainModel

use of org.eclipse.xtext.serializer.hiddentokensequencertest.DomainModel in project xtext-core by eclipse.

the class ModelImpl method basicSetDomainModel.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetDomainModel(DomainModel newDomainModel, NotificationChain msgs) {
    DomainModel oldDomainModel = domainModel;
    domainModel = newDomainModel;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, HiddentokensequencertestPackage.MODEL__DOMAIN_MODEL, oldDomainModel, newDomainModel);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : DomainModel(org.eclipse.xtext.serializer.hiddentokensequencertest.DomainModel) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with DomainModel

use of org.eclipse.xtext.serializer.hiddentokensequencertest.DomainModel in project xtext-core by eclipse.

the class HiddenTokenSequencerTestLanguageSemanticSequencer 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 == HiddentokensequencertestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case HiddentokensequencertestPackage.DOMAIN_MODEL:
                sequence_DomainModel(context, (DomainModel) semanticObject);
                return;
            case HiddentokensequencertestPackage.ENTITY:
                sequence_Entity(context, (Entity) semanticObject);
                return;
            case HiddentokensequencertestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Entity(org.eclipse.xtext.serializer.hiddentokensequencertest.Entity) Action(org.eclipse.xtext.Action) DomainModel(org.eclipse.xtext.serializer.hiddentokensequencertest.DomainModel) Model(org.eclipse.xtext.serializer.hiddentokensequencertest.Model) DomainModel(org.eclipse.xtext.serializer.hiddentokensequencertest.DomainModel) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

DomainModel (org.eclipse.xtext.serializer.hiddentokensequencertest.DomainModel)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 Entity (org.eclipse.xtext.serializer.hiddentokensequencertest.Entity)1 Model (org.eclipse.xtext.serializer.hiddentokensequencertest.Model)1