use of org.eclipse.xtext.linking.bug287988Test.BaseAttribute in project xtext-core by eclipse.
the class BaseAttributeImpl method setTypeRef.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTypeRef(BaseAttribute newTypeRef) {
BaseAttribute oldTypeRef = typeRef;
typeRef = newTypeRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bug287988TestPackage.BASE_ATTRIBUTE__TYPE_REF, oldTypeRef, typeRef));
}
use of org.eclipse.xtext.linking.bug287988Test.BaseAttribute in project xtext-core by eclipse.
the class Bug287988WithEagerLinkingTest method testAction_03.
@Override
@Test
public void testAction_03() throws Exception {
String modelAsString = "actions master mytype attr1; attribute ref attr3 attr2;";
Model model = (Model) getModelAndExpect(modelAsString, 1);
assertEquals(2, model.getAttributes().size());
BaseAttribute baseAttribute = model.getAttributes().get(1);
assertNull(baseAttribute.getTypeRef());
}
use of org.eclipse.xtext.linking.bug287988Test.BaseAttribute in project xtext-core by eclipse.
the class Bug287988Test method testAction_03.
@Test
public void testAction_03() throws Exception {
String modelAsString = "actions master mytype attr1; attribute ref attr3 attr2;";
Model model = (Model) getModelAndExpect(modelAsString, 1);
assertEquals(2, model.getAttributes().size());
BaseAttribute baseAttribute = model.getAttributes().get(1);
assertNotNull(baseAttribute.getTypeRef());
EObject eObject = baseAttribute.getTypeRef();
assertTrue(eObject.eIsProxy());
}
use of org.eclipse.xtext.linking.bug287988Test.BaseAttribute in project xtext-core by eclipse.
the class Bug287988Test method checkSecondAttrRefersToFirst.
protected void checkSecondAttrRefersToFirst(String modelAsString) throws Exception {
Model model = (Model) getModel(modelAsString);
assertEquals(2, model.getAttributes().size());
BaseAttribute baseAttribute = model.getAttributes().get(1);
assertEquals(model.getAttributes().get(0), baseAttribute.getTypeRef());
}
use of org.eclipse.xtext.linking.bug287988Test.BaseAttribute in project xtext-core by eclipse.
the class Bug287988Test method testAction_02.
@Test
public void testAction_02() throws Exception {
String modelAsString = "actions master mytype attr1; attribute myOtherType attr2;";
Model model = (Model) getModel(modelAsString);
assertEquals(2, model.getAttributes().size());
BaseAttribute baseAttribute = model.getAttributes().get(1);
assertNull(baseAttribute.getTypeRef());
}
Aggregations