use of org.eclipse.xtext.common.types.JvmField in project xtext-xtend by eclipse.
the class LinkingTest method testXtendField_00.
@Test
public void testXtendField_00() throws Exception {
XtendClass clazz = clazz("class Foo {" + " @com.google.inject.Inject java.util.ArrayList<String> arrayList" + " def foo() {arrayList}" + "}");
XtendFunction func = (XtendFunction) clazz.getMembers().get(1);
JvmField field = (JvmField) associator.getJvmElements(clazz.getMembers().get(0)).iterator().next();
assertSame(field, ((XFeatureCall) ((XBlockExpression) func.getExpression()).getExpressions().get(0)).getFeature());
}
Aggregations