use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testParameter_shadows_fieldOfIt.
@Test
public void testParameter_shadows_fieldOfIt() throws Exception {
XtendClass clazz = clazz("class SomeClass {\n" + " def method(String publicField, testdata.LinkingType it) {\n" + " publicField\n" + " }\n" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("publicField", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testField_noConflicts_publicStaticExtension.
@Test
public void testField_noConflicts_publicStaticExtension() throws Exception {
XtendClass clazz = clazz("import static extension testdata.LinkingStaticType.*\n" + "class SomeClass {\n" + " def method() {\n" + " publicField\n" + " }" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("testdata.LinkingStaticType.publicField", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testOperationWithParam_noConflict.
@Test
public void testOperationWithParam_noConflict() throws Exception {
XtendClass clazz = clazz("class SomeClass {\n" + " def void method() {\n" + " methodWithParam('foo')\n" + " }\n" + " def methodWithParam(String s) {}" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("SomeClass.methodWithParam(java.lang.String)", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testField_onIt_shadows_injectedExtension.
@Test
public void testField_onIt_shadows_injectedExtension() throws Exception {
XtendClass clazz = clazz("class SomeClass {\n" + " def method(testdata.LinkingType it) {\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_injectedExtension_shadows_importedExtension.
@Test
public void testField_injectedExtension_shadows_importedExtension() throws Exception {
XtendClass clazz = clazz("import static extension 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