Search in sources :

Example 1 with Child

use of org.eclipse.xtext.linking.lazy.bug311337.Child in project xtext-core by eclipse.

the class ReferenceImpl method setRefChild.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setRefChild(Child newRefChild) {
    Child oldRefChild = refChild;
    refChild = newRefChild;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, Bug311337Package.REFERENCE__REF_CHILD, oldRefChild, refChild));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Child(org.eclipse.xtext.linking.lazy.bug311337.Child)

Example 2 with Child

use of org.eclipse.xtext.linking.lazy.bug311337.Child in project xtext-core by eclipse.

the class Bug311337TestLanguageSemanticSequencer 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 == Bug311337Package.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug311337Package.CHILD:
                sequence_Child(context, (Child) semanticObject);
                return;
            case Bug311337Package.DEFINITION:
                sequence_Definition(context, (Definition) semanticObject);
                return;
            case Bug311337Package.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case Bug311337Package.NESTED_REF:
                sequence_Reference(context, (NestedRef) semanticObject);
                return;
            case Bug311337Package.REFERENCE:
                sequence_Reference(context, (Reference) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) NestedRef(org.eclipse.xtext.linking.lazy.bug311337.NestedRef) Action(org.eclipse.xtext.Action) Reference(org.eclipse.xtext.linking.lazy.bug311337.Reference) Definition(org.eclipse.xtext.linking.lazy.bug311337.Definition) Model(org.eclipse.xtext.linking.lazy.bug311337.Model) Parameter(org.eclipse.xtext.Parameter) Child(org.eclipse.xtext.linking.lazy.bug311337.Child) EPackage(org.eclipse.emf.ecore.EPackage)

Example 3 with Child

use of org.eclipse.xtext.linking.lazy.bug311337.Child in project podam by devopsfolks.

the class PodamFactoryBasicTypesTest method podamShouldSupportCircularDependencies.

@Test
@Title("Podam should fill in POJOs which have a circular dependency")
public void podamShouldSupportCircularDependencies() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    Parent parent = podamInvocationSteps.whenIInvokeTheFactoryForClass(Parent.class, podamFactory);
    podamValidationSteps.thePojoMustBeOfTheType(parent, Parent.class);
    Child child = parent.getChild();
    podamValidationSteps.thePojoMustBeOfTheType(child, Child.class);
}
Also used : Parent(uk.co.jemos.podam.test.dto.pdm6.Parent) PodamFactory(uk.co.jemos.podam.api.PodamFactory) Child(uk.co.jemos.podam.test.dto.pdm6.Child) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Example 4 with Child

use of org.eclipse.xtext.linking.lazy.bug311337.Child in project xtext-core by eclipse.

the class ModelImpl method basicSetChildren.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetChildren(Child newChildren, NotificationChain msgs) {
    Child oldChildren = children;
    children = newChildren;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bug250313Package.MODEL__CHILDREN, oldChildren, newChildren);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Child(org.eclipse.xtext.valueconverter.bug250313.Child)

Example 5 with Child

use of org.eclipse.xtext.linking.lazy.bug311337.Child in project xtext-core by eclipse.

the class Bug311337Test method testNoCyclicLinkingException.

@Test
public void testNoCyclicLinkingException() throws Exception {
    Model model = (Model) getModel("/************************************/\n" + "(def) local :\n" + "   (child) local_Child : def_depth1\n" + "   (ref) local_Child:depth1_Child\n" + "\n" + "/************************************/\n" + "\n" + "(def) def_depth1 :\n" + "   (child) depth1_Child : def_depth2\n" + "\n" + "/************************************/\n" + "\n" + "(def) def_depth2 :\n" + "   (child) depth2_Child :\n");
    assertTrue(model.eResource().getErrors().isEmpty());
}
Also used : Model(org.eclipse.xtext.linking.lazy.bug311337.Model) Test(org.junit.Test)

Aggregations

ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)2 Child (org.eclipse.xtext.linking.lazy.bug311337.Child)2 Model (org.eclipse.xtext.linking.lazy.bug311337.Model)2 Test (org.junit.Test)2 Title (net.thucydides.core.annotations.Title)1 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 Definition (org.eclipse.xtext.linking.lazy.bug311337.Definition)1 NestedRef (org.eclipse.xtext.linking.lazy.bug311337.NestedRef)1 Reference (org.eclipse.xtext.linking.lazy.bug311337.Reference)1 Child (org.eclipse.xtext.valueconverter.bug250313.Child)1 PodamFactory (uk.co.jemos.podam.api.PodamFactory)1 Child (uk.co.jemos.podam.test.dto.pdm6.Child)1 Parent (uk.co.jemos.podam.test.dto.pdm6.Parent)1