Search in sources :

Example 1 with TypeDeclaration

use of org.eclipse.xtext.ide.tests.testlanguage.partialContentAssistTestLanguage.TypeDeclaration in project xtext-core by eclipse.

the class PartialContentAssistTestLanguageSemanticSequencer 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 == PartialContentAssistTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case PartialContentAssistTestLanguagePackage.PROPERTY:
                sequence_Property(context, (Property) semanticObject);
                return;
            case PartialContentAssistTestLanguagePackage.TYPE_DECLARATION:
                sequence_TypeDeclaration(context, (TypeDeclaration) 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) Property(org.eclipse.xtext.ide.tests.testlanguage.partialContentAssistTestLanguage.Property) TypeDeclaration(org.eclipse.xtext.ide.tests.testlanguage.partialContentAssistTestLanguage.TypeDeclaration) EPackage(org.eclipse.emf.ecore.EPackage)

Example 2 with TypeDeclaration

use of org.eclipse.xtext.ide.tests.testlanguage.partialContentAssistTestLanguage.TypeDeclaration in project xtext-core by eclipse.

the class TypeDeclarationImpl method setSuperType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setSuperType(TypeDeclaration newSuperType) {
    TypeDeclaration oldSuperType = superType;
    superType = newSuperType;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, PartialContentAssistTestLanguagePackage.TYPE_DECLARATION__SUPER_TYPE, oldSuperType, superType));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) TypeDeclaration(org.eclipse.xtext.ide.tests.testlanguage.partialContentAssistTestLanguage.TypeDeclaration)

Aggregations

TypeDeclaration (org.eclipse.xtext.ide.tests.testlanguage.partialContentAssistTestLanguage.TypeDeclaration)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 Property (org.eclipse.xtext.ide.tests.testlanguage.partialContentAssistTestLanguage.Property)1