Search in sources :

Example 1 with Child

use of org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.Child in project xtext-eclipse by eclipse.

the class Bug377311TestLanguageSemanticSequencer 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 == Bug377311Package.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug377311Package.CHILD:
                sequence_Child(context, (Child) semanticObject);
                return;
            case Bug377311Package.ROOT:
                sequence_Root(context, (Root) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Root(org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.Root) Parameter(org.eclipse.xtext.Parameter) Child(org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.Child) EPackage(org.eclipse.emf.ecore.EPackage)

Example 2 with Child

use of org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.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 3 with Child

use of org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.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 4 with Child

use of org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.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 5 with Child

use of org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.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)

Aggregations

EPackage (org.eclipse.emf.ecore.EPackage)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)2 Action (org.eclipse.xtext.Action)2 Parameter (org.eclipse.xtext.Parameter)2 ParserRule (org.eclipse.xtext.ParserRule)2 Child (org.eclipse.xtext.linking.lazy.bug311337.Child)2 Title (net.thucydides.core.annotations.Title)1 Definition (org.eclipse.xtext.linking.lazy.bug311337.Definition)1 Model (org.eclipse.xtext.linking.lazy.bug311337.Model)1 NestedRef (org.eclipse.xtext.linking.lazy.bug311337.NestedRef)1 Reference (org.eclipse.xtext.linking.lazy.bug311337.Reference)1 Child (org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.Child)1 Root (org.eclipse.xtext.ui.tests.editor.contentassist.bug377311.Root)1 Child (org.eclipse.xtext.valueconverter.bug250313.Child)1 Test (org.junit.Test)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