use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testField_inherited_shadows_injectedExtension.
@Test
public void testField_inherited_shadows_injectedExtension() throws Exception {
XtendClass clazz = clazz("class SomeClass extends testdata.LinkingType {\n" + " def method() {\n" + " publicField\n" + " }\n" + " extension testdata.LinkingTypeEquallyNamed\n" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("testdata.LinkingType.publicField", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testField_onIt_shadows_local.
@Test
public void testField_onIt_shadows_local() throws Exception {
XtendClass clazz = clazz("class SomeClass {\n" + " def method(testdata.LinkingType it) {\n" + " publicField\n" + " }\n" + " public String publicField\n" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("testdata.LinkingType.publicField", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testField_noConflicts_inheritedProtected.
@Test
public void testField_noConflicts_inheritedProtected() throws Exception {
XtendClass clazz = clazz("class SomeClass extends testdata.LinkingType {\n" + " def method() {\n" + " protectedField\n" + " }\n" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("testdata.LinkingType.protectedField", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testField_noConflicts_protectedStaticExtension.
@Test
public void testField_noConflicts_protectedStaticExtension() throws Exception {
XtendClass clazz = clazz("import static extension testdata.LinkingStaticType.*\n" + "class SomeClass {\n" + " def method() {\n" + " protectedField\n" + " }" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("testdata.LinkingStaticType.protectedField", featureCall, true);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testField_injectedExtension_shadows_staticallyImported.
@Test
public void testField_injectedExtension_shadows_staticallyImported() throws Exception {
XtendClass clazz = clazz("import static testdata.LinkingStaticType.*" + "class SomeClass {\n" + " def method() {\n" + " publicField\n" + " }\n" + " extension testdata.LinkingType\n" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("testdata.LinkingType.publicField", featureCall);
}
Aggregations