use of org.eclipse.xtext.resource.IEObjectDescription in project xtext-eclipse by eclipse.
the class AbstractConstructorScopeTest method testGetElementByName_05.
@Test
public void testGetElementByName_05() {
IEObjectDescription objectElement = getConstructorScope().getSingleElement(QualifiedName.create(List.class.getName()));
assertNull(objectElement);
}
use of org.eclipse.xtext.resource.IEObjectDescription in project xtext-eclipse by eclipse.
the class AbstractConstructorScopeTest method testGetElementsByName_03.
@Test
public void testGetElementsByName_03() {
List<String> segments = Strings.split("org.eclipse.xtext.common.types.testSetups.NestedParameterizedTypes.WrappedCollection.WrappedIterator", '.');
QualifiedName qualifiedName = QualifiedName.create(segments);
Iterable<IEObjectDescription> descriptions = getConstructorScope().getElements(qualifiedName);
for (IEObjectDescription description : descriptions) {
assertEquals(qualifiedName, description.getName());
}
assertEquals(3, Iterables.size(descriptions));
}
use of org.eclipse.xtext.resource.IEObjectDescription in project xtext-eclipse by eclipse.
the class AbstractConstructorScopeTest method testGetElementByName_06.
@Test
public void testGetElementByName_06() {
IEObjectDescription hashMapEntry = getConstructorScope().getSingleElement(QualifiedName.create("java", "util", "Hashtable$Entry"));
assertNotNull(hashMapEntry);
assertFalse(hashMapEntry.getEObjectOrProxy().eIsProxy());
assertEquals(TypesPackage.Literals.JVM_CONSTRUCTOR, hashMapEntry.getEClass());
assertEquals(QualifiedName.create("java", "util", "Hashtable$Entry"), hashMapEntry.getName());
}
use of org.eclipse.xtext.resource.IEObjectDescription in project xtext-eclipse by eclipse.
the class AbstractConstructorScopeTest method testGetElementsByName_01.
@Test
public void testGetElementsByName_01() {
Iterable<IEObjectDescription> descriptions = getConstructorScope().getElements(QualifiedName.create("java", "util", "Hashtable$Entry"));
IEObjectDescription hashMapEntry = Iterables.getOnlyElement(descriptions);
assertNotNull(hashMapEntry);
assertFalse(hashMapEntry.getEObjectOrProxy().eIsProxy());
assertEquals(TypesPackage.Literals.JVM_CONSTRUCTOR, hashMapEntry.getEClass());
assertEquals(QualifiedName.create("java", "util", "Hashtable$Entry"), hashMapEntry.getName());
}
use of org.eclipse.xtext.resource.IEObjectDescription in project xtext-eclipse by eclipse.
the class AbstractConstructorScopeTest method testGetElementByInstance_02.
@Test
public void testGetElementByInstance_02() {
JvmVoid voidType = TypesFactory.eINSTANCE.createJvmVoid();
IEObjectDescription element = getConstructorScope().getSingleElement(voidType);
assertNull(element);
}
Aggregations