Search in sources :

Example 1 with ParentRefTestChild

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

the class ParentRefTest1Impl method basicSetChild1.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetChild1(ParentRefTestChild newChild1, NotificationChain msgs) {
    ParentRefTestChild oldChild1 = child1;
    child1 = newChild1;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ContextFinderTestPackage.PARENT_REF_TEST1__CHILD1, oldChild1, newChild1);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ParentRefTestChild(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with ParentRefTestChild

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

the class ParentRefTest2Impl method basicSetChild2.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetChild2(ParentRefTestChild newChild2, NotificationChain msgs) {
    ParentRefTestChild oldChild2 = child2;
    child2 = newChild2;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ContextFinderTestPackage.PARENT_REF_TEST2__CHILD2, oldChild2, newChild2);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ParentRefTestChild(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 3 with ParentRefTestChild

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

the class ParentRefTestChildImpl method basicSetChild.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetChild(ParentRefTestChild newChild, NotificationChain msgs) {
    ParentRefTestChild oldChild = child;
    child = newChild;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ContextFinderTestPackage.PARENT_REF_TEST_CHILD__CHILD, oldChild, newChild);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ParentRefTestChild(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 4 with ParentRefTestChild

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

the class ContextFinderTest method testParentRefTest1.

@Test
public void testParentRefTest1() throws Exception {
    Model model = parseHelper.parse("#4 kw1 foo");
    ParentRefTestChild child1 = ((ParentRefTest1) model.getParentRef()).getChild1();
    assertEquals("ParentRefTestChild1", findContextsByContentsAndContainer(child1));
}
Also used : ParentRefTestChild(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild) Model(org.eclipse.xtext.serializer.contextFinderTest.Model) ParentRefTest1(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest1) Test(org.junit.Test)

Example 5 with ParentRefTestChild

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

the class ContextFinderTest method testParentRefTest2.

@Test
public void testParentRefTest2() throws Exception {
    Model model = parseHelper.parse("#4 kw2 foo");
    ParentRefTestChild child2 = ((ParentRefTest2) model.getParentRef()).getChild2();
    assertEquals("ParentRefTestChild2", findContextsByContentsAndContainer(child2));
}
Also used : ParentRefTestChild(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild) Model(org.eclipse.xtext.serializer.contextFinderTest.Model) ParentRefTest2(org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest2) Test(org.junit.Test)

Aggregations

ParentRefTestChild (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild)8 Model (org.eclipse.xtext.serializer.contextFinderTest.Model)5 Test (org.junit.Test)4 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)3 ParentRefTest1 (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest1)3 ParentRefTest2 (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest2)3 EPackage (org.eclipse.emf.ecore.EPackage)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 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 NestedTypeTest (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeTest)1 NodeExclusion (org.eclipse.xtext.serializer.contextFinderTest.NodeExclusion)1 NodeExclusionList (org.eclipse.xtext.serializer.contextFinderTest.NodeExclusionList)1 QuantityExclusionTest (org.eclipse.xtext.serializer.contextFinderTest.QuantityExclusionTest)1