Search in sources :

Example 1 with NestedTypeTest

use of org.eclipse.xtext.serializer.contextFinderTest.NestedTypeTest in project xtext-core by eclipse.

the class ModelImpl method basicSetNestedType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetNestedType(NestedTypeTest newNestedType, NotificationChain msgs) {
    NestedTypeTest oldNestedType = nestedType;
    nestedType = newNestedType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ContextFinderTestPackage.MODEL__NESTED_TYPE, oldNestedType, newNestedType);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : NestedTypeTest(org.eclipse.xtext.serializer.contextFinderTest.NestedTypeTest) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with NestedTypeTest

use of org.eclipse.xtext.serializer.contextFinderTest.NestedTypeTest in project xtext-core by eclipse.

the class ContextFinderTestLanguageSemanticSequencer 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 == ContextFinderTestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case ContextFinderTestPackage.ATTRIBUTE_EXCLUSION_TEST:
                if (rule == grammarAccess.getAttributeExclusionTest1Rule()) {
                    sequence_AttributeExclusionTest1(context, (AttributeExclusionTest) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAttributeExclusionTest2Rule()) {
                    sequence_AttributeExclusionTest2(context, (AttributeExclusionTest) semanticObject);
                    return;
                } else
                    break;
            case ContextFinderTestPackage.MODEL:
                if (rule == grammarAccess.getModel2Rule()) {
                    sequence_Model2(context, (Model) semanticObject);
                    return;
                } else if (rule == grammarAccess.getModelRule()) {
                    sequence_Model(context, (Model) semanticObject);
                    return;
                } else
                    break;
            case ContextFinderTestPackage.NESTED_TYPE_CHILD1:
                sequence_NestedTypeChild1(context, (NestedTypeChild1) semanticObject);
                return;
            case ContextFinderTestPackage.NESTED_TYPE_CHILD2:
                sequence_NestedTypeChild2(context, (NestedTypeChild2) semanticObject);
                return;
            case ContextFinderTestPackage.NESTED_TYPE_RECURSIVE_TEST:
                if (rule == grammarAccess.getNestedTypeRecursiveTest1Rule() || action == grammarAccess.getNestedTypeRecursiveTest1Access().getNestedTypeRecursiveTestLeftAction_2_0()) {
                    sequence_NestedTypeRecursiveTest1(context, (NestedTypeRecursiveTest) semanticObject);
                    return;
                } else if (rule == grammarAccess.getNestedTypeRecursiveTest2Rule() || action == grammarAccess.getNestedTypeRecursiveTest2Access().getNestedTypeRecursiveTestLeftAction_2_0()) {
                    sequence_NestedTypeRecursiveTest2(context, (NestedTypeRecursiveTest) semanticObject);
                    return;
                } else
                    break;
            case ContextFinderTestPackage.NESTED_TYPE_RECURSIVE_TEST1:
                sequence_NestedTypeRecursiveTest1_NestedTypeRecursiveTest_2_0(context, (NestedTypeRecursiveTest1) semanticObject);
                return;
            case ContextFinderTestPackage.NESTED_TYPE_RECURSIVE_TEST2:
                sequence_NestedTypeRecursiveTest2_NestedTypeRecursiveTest_2_0(context, (NestedTypeRecursiveTest2) semanticObject);
                return;
            case ContextFinderTestPackage.NESTED_TYPE_TEST:
                if (rule == grammarAccess.getNestedTypeTest1Rule()) {
                    sequence_NestedTypeTest1(context, (NestedTypeTest) semanticObject);
                    return;
                } else if (rule == grammarAccess.getNestedTypeTest2Rule()) {
                    sequence_NestedTypeTest2(context, (NestedTypeTest) semanticObject);
                    return;
                } else
                    break;
            case ContextFinderTestPackage.NODE_EXCLUSION:
                if (rule == grammarAccess.getNodeExclusion1Rule()) {
                    sequence_NodeExclusion1(context, (NodeExclusion) semanticObject);
                    return;
                } else if (rule == grammarAccess.getNodeExclusion2Rule()) {
                    sequence_NodeExclusion2(context, (NodeExclusion) semanticObject);
                    return;
                } else
                    break;
            case ContextFinderTestPackage.NODE_EXCLUSION_LIST:
                if (rule == grammarAccess.getNodeExclusion1ListRule()) {
                    sequence_NodeExclusion1List(context, (NodeExclusionList) semanticObject);
                    return;
                } else if (rule == grammarAccess.getNodeExclusion2ListRule()) {
                    sequence_NodeExclusion2List(context, (NodeExclusionList) semanticObject);
                    return;
                } else
                    break;
            case ContextFinderTestPackage.PARENT_REF_TEST1:
                sequence_ParentRefTest1(context, (ParentRefTest1) semanticObject);
                return;
            case ContextFinderTestPackage.PARENT_REF_TEST2:
                sequence_ParentRefTest2(context, (ParentRefTest2) semanticObject);
                return;
            case ContextFinderTestPackage.PARENT_REF_TEST_CHILD:
                if (rule == grammarAccess.getParentRefTestChild1Rule()) {
                    sequence_ParentRefTestChild1(context, (ParentRefTestChild) semanticObject);
                    return;
                } else if (rule == grammarAccess.getParentRefTestChild2Rule()) {
                    sequence_ParentRefTestChild2(context, (ParentRefTestChild) semanticObject);
                    return;
                } else
                    break;
            case ContextFinderTestPackage.QUANTITY_EXCLUSION_TEST:
                if (rule == grammarAccess.getQuantityExclusionTest1Rule()) {
                    sequence_QuantityExclusionTest1(context, (QuantityExclusionTest) semanticObject);
                    return;
                } else if (rule == grammarAccess.getQuantityExclusionTest2Rule()) {
                    sequence_QuantityExclusionTest2(context, (QuantityExclusionTest) semanticObject);
                    return;
                } else
                    break;
            case ContextFinderTestPackage.VALUE_EXCLUSION_TEST:
                if (rule == grammarAccess.getValueExclusionTest1Rule()) {
                    sequence_ValueExclusionTest1(context, (ValueExclusionTest) semanticObject);
                    return;
                } else if (rule == grammarAccess.getValueExclusionTest2Rule()) {
                    sequence_ValueExclusionTest2(context, (ValueExclusionTest) semanticObject);
                    return;
                } else
                    break;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ValueExclusionTest(org.eclipse.xtext.serializer.contextFinderTest.ValueExclusionTest) ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) NestedTypeRecursiveTest(org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest) EPackage(org.eclipse.emf.ecore.EPackage) AttributeExclusionTest(org.eclipse.xtext.serializer.contextFinderTest.AttributeExclusionTest) NodeExclusion(org.eclipse.xtext.serializer.contextFinderTest.NodeExclusion) NestedTypeTest(org.eclipse.xtext.serializer.contextFinderTest.NestedTypeTest) QuantityExclusionTest(org.eclipse.xtext.serializer.contextFinderTest.QuantityExclusionTest) ParentRefTestChild(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild) NestedTypeRecursiveTest2(org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest2) NestedTypeRecursiveTest1(org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest1) Model(org.eclipse.xtext.serializer.contextFinderTest.Model) NodeExclusionList(org.eclipse.xtext.serializer.contextFinderTest.NodeExclusionList) ParentRefTest1(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest1) Parameter(org.eclipse.xtext.Parameter) ParentRefTest2(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest2) NestedTypeChild2(org.eclipse.xtext.serializer.contextFinderTest.NestedTypeChild2) NestedTypeChild1(org.eclipse.xtext.serializer.contextFinderTest.NestedTypeChild1)

Aggregations

NestedTypeTest (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeTest)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 AttributeExclusionTest (org.eclipse.xtext.serializer.contextFinderTest.AttributeExclusionTest)1 Model (org.eclipse.xtext.serializer.contextFinderTest.Model)1 NestedTypeChild1 (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeChild1)1 NestedTypeChild2 (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeChild2)1 NestedTypeRecursiveTest (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest)1 NestedTypeRecursiveTest1 (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest1)1 NestedTypeRecursiveTest2 (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest2)1 NodeExclusion (org.eclipse.xtext.serializer.contextFinderTest.NodeExclusion)1 NodeExclusionList (org.eclipse.xtext.serializer.contextFinderTest.NodeExclusionList)1 ParentRefTest1 (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest1)1 ParentRefTest2 (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest2)1 ParentRefTestChild (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild)1 QuantityExclusionTest (org.eclipse.xtext.serializer.contextFinderTest.QuantityExclusionTest)1 ValueExclusionTest (org.eclipse.xtext.serializer.contextFinderTest.ValueExclusionTest)1