Search in sources :

Example 1 with ReferenceHolder

use of org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.ReferenceHolder in project xtext-eclipse by eclipse.

the class ContentAssistTestLanguageSemanticSequencer 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 == ContentAssistTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case ContentAssistTestLanguagePackage.GENERATE_DIRECTIVE:
                sequence_GenerateDirective(context, (GenerateDirective) semanticObject);
                return;
            case ContentAssistTestLanguagePackage.IMPORT:
                sequence_Import(context, (Import) semanticObject);
                return;
            case ContentAssistTestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case ContentAssistTestLanguagePackage.REFERENCE_HOLDER:
                sequence_ReferenceHolder(context, (ReferenceHolder) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Import(org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.Import) ReferenceHolder(org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.ReferenceHolder) Model(org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) GenerateDirective(org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.GenerateDirective) EPackage(org.eclipse.emf.ecore.EPackage)

Example 2 with ReferenceHolder

use of org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.ReferenceHolder in project xtext-eclipse by eclipse.

the class ModelImpl method basicSetReferenceHolder.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetReferenceHolder(ReferenceHolder newReferenceHolder, NotificationChain msgs) {
    ReferenceHolder oldReferenceHolder = referenceHolder;
    referenceHolder = newReferenceHolder;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ContentAssistTestLanguagePackage.MODEL__REFERENCE_HOLDER, oldReferenceHolder, newReferenceHolder);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ReferenceHolder(org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.ReferenceHolder) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

ReferenceHolder (org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.ReferenceHolder)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 GenerateDirective (org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.GenerateDirective)1 Import (org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.Import)1 Model (org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.Model)1