use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class TypeProviderTest method testParameterizedExtension_09.
@Test
public void testParameterizedExtension_09() throws Exception {
XtendFile file = file("package testPackage\n" + "import org.eclipse.xtext.testing.util.ParseHelper\n" + "import org.eclipse.xtend.core.xtend.XtendFile\n" + "class C {\n" + " extension ParseHelper<XtendFile>\n" + " def m() {" + " ''.parse\n" + " }\n" + "}\n");
XtendClass c = (XtendClass) file.getXtendTypes().get(0);
XAbstractFeatureCall parse = findSingleFeatureCall(c);
assertEquals("org.eclipse.xtext.testing.util.ParseHelper.parse(java.lang.CharSequence)", parse.getFeature().getIdentifier());
assertEquals("XtendFile", getType(parse).getSimpleName());
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class TypeProviderTest method testParameterizedExtension_04.
@Test
public void testParameterizedExtension_04() throws Exception {
XtendFile file = file("package testPackage\n" + "import org.eclipse.xtext.testing.util.ParseHelper\n" + "import org.eclipse.xtend.core.xtend.XtendFile\n" + "class C<F extends XtendFile, T extends ParseHelper<F>> {\n" + " extension T\n" + " def m() {" + " parse('')\n" + " }\n" + "}\n");
XtendClass c = (XtendClass) file.getXtendTypes().get(0);
XAbstractFeatureCall parse = findSingleFeatureCall(c);
assertEquals("org.eclipse.xtext.testing.util.ParseHelper.parse(java.lang.CharSequence)", parse.getFeature().getIdentifier());
assertEquals("F", getType(parse).getSimpleName());
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class TypeProviderTest method testParameterizedExtension_11.
@Test
public void testParameterizedExtension_11() throws Exception {
XtendFile file = file("package testPackage\n" + "import org.eclipse.xtext.testing.util.ParseHelper\n" + "import org.eclipse.xtend.core.xtend.XtendFile\n" + "class C<T extends XtendFile> {\n" + " extension ParseHelper<T>\n" + " def m() {" + " ''.parse\n" + " }\n" + "}\n");
XtendClass c = (XtendClass) file.getXtendTypes().get(0);
XAbstractFeatureCall parse = findSingleFeatureCall(c);
assertEquals("org.eclipse.xtext.testing.util.ParseHelper.parse(java.lang.CharSequence)", parse.getFeature().getIdentifier());
assertEquals("T", getType(parse).getSimpleName());
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class TypeProviderTest method testParameterizedExtension_08.
@Test
public void testParameterizedExtension_08() throws Exception {
XtendFile file = file("package testPackage\n" + "import org.eclipse.xtext.testing.util.ParseHelper\n" + "import org.eclipse.xtend.core.xtend.XtendFile\n" + "class C extends ParseHelper<XtendFile> {\n" + " def m() {" + " ''.parse\n" + " }\n" + "}\n");
XtendClass c = (XtendClass) file.getXtendTypes().get(0);
XAbstractFeatureCall parse = findSingleFeatureCall(c);
assertEquals("org.eclipse.xtext.testing.util.ParseHelper.parse(java.lang.CharSequence)", parse.getFeature().getIdentifier());
assertEquals("XtendFile", getType(parse).getSimpleName());
}
use of org.eclipse.xtext.xbase.XAbstractFeatureCall in project xtext-xtend by eclipse.
the class TypeProviderTest method testParameterizedExtension_01.
@Test
public void testParameterizedExtension_01() throws Exception {
XtendFile file = file("package testPackage\n" + "import org.eclipse.xtext.testing.util.ParseHelper\n" + "import org.eclipse.xtend.core.xtend.XtendFile\n" + "class C {\n" + " extension ParseHelper<XtendFile>\n" + " def m() {" + " parse('')\n" + " }\n" + "}\n");
XtendClass c = (XtendClass) file.getXtendTypes().get(0);
XAbstractFeatureCall parse = findSingleFeatureCall(c);
assertEquals("org.eclipse.xtext.testing.util.ParseHelper.parse(java.lang.CharSequence)", parse.getFeature().getIdentifier());
assertEquals("XtendFile", getType(parse).getSimpleName());
}
Aggregations