use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testOperation_sugarOnIt_shadows_sugarOnThis.
@Test
public void testOperation_sugarOnIt_shadows_sugarOnThis() throws Exception {
XtendClass clazz = clazz("class SomeClass {\n" + " def method(testdata.LinkingType it) {\n" + " fieldOverloadsMethod\n" + " }\n" + " def fieldOverloadsMethod() {}" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("testdata.LinkingType.fieldOverloadsMethod()", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testField_noConflicts_publicOnIt.
@Test
public void testField_noConflicts_publicOnIt() throws Exception {
XtendClass clazz = clazz("class SomeClass {\n" + " def method(testdata.LinkingType it) {\n" + " publicField\n" + " }\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_local.
@Test
public void testField_noConflicts_local() throws Exception {
XtendClass clazz = clazz("class SomeClass {\n" + " def method() {\n" + " aString\n" + " }\n" + " private String aString\n" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("SomeClass.aString", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testParameter_shadows_field.
@Test
public void testParameter_shadows_field() throws Exception {
XtendClass clazz = clazz("class SomeClass {\n" + " def method(String aString) {\n" + " aString\n" + " }\n" + " String aString" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("aString", featureCall);
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class LinkingShadowingTest method testOperation_sugarOnStatic_shadows_implicitArgumentOnThis.
@Test
public void testOperation_sugarOnStatic_shadows_implicitArgumentOnThis() throws Exception {
XtendClass clazz = clazz("import static testdata.LinkingStaticTypeEquallyNamed.*\n" + "class SomeClass {\n" + " def method(Object it) {\n" + " fieldOverloadsMethod\n" + " }\n" + " def fieldOverloadsMethod(Object o) {}" + "}");
XAbstractFeatureCall featureCall = getFirstFeatureCall(clazz);
assertLinksTo("testdata.LinkingStaticTypeEquallyNamed.fieldOverloadsMethod()", featureCall);
}
Aggregations