|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.scoping.Scopes
public class Scopes
This class contains static utility functions to create and work on IScope
and IEObjectDescription
Constructor Summary | |
---|---|
Scopes()
|
Method Summary | ||
---|---|---|
static java.lang.Iterable<IEObjectDescription> |
filterDuplicates(java.lang.Iterable<IEObjectDescription> filtered)
|
|
static com.google.common.collect.Multimap<QualifiedName,IEObjectDescription> |
index(java.lang.Iterable<IEObjectDescription> descriptions)
indexes the IEObject description using the given |
|
static
|
index(java.lang.Iterable<IEObjectDescription> descriptions,
com.google.common.base.Function<IEObjectDescription,T> indexer)
indexes the IEObject description using the given |
|
static java.lang.Iterable<IEObjectDescription> |
scopedElementsFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements)
transforms an Iterable of EObject s into an Iterable of IEObjectDescription s computing
the EAttribute 'name' to compute the IEObjectDescription 's name. |
|
static
|
scopedElementsFor(java.lang.Iterable<? extends T> elements,
com.google.common.base.Function<T,QualifiedName> nameComputation)
transforms an Iterable of EObject s into an Iterable of IEObjectDescription s computing
the name of the elements using the passed Function If the passed function returns null the object is
filtered out. |
|
static IScope |
scopeFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements)
creates a scope using SimpleAttributeResolver.NAME_RESOLVER to compute the names and sets
IScope.NULLSCOPE as parent scope |
|
static IScope |
scopeFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements,
IScope outer)
creates a scope using SimpleAttributeResolver.NAME_RESOLVER to compute the names |
|
static
|
scopeFor(java.lang.Iterable<? extends T> elements,
com.google.common.base.Function<T,QualifiedName> nameComputation,
IScope outer)
creates a scope using the passed function to compute the names and sets the passed scope as the parent scope |
|
static java.lang.Iterable<IEObjectDescription> |
selectCompatible(java.lang.Iterable<IEObjectDescription> exportedObjects,
org.eclipse.emf.ecore.EClass clazz)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Scopes()
Method Detail |
---|
public static java.lang.Iterable<IEObjectDescription> selectCompatible(java.lang.Iterable<IEObjectDescription> exportedObjects, org.eclipse.emf.ecore.EClass clazz)
public static IScope scopeFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements)
SimpleAttributeResolver.NAME_RESOLVER
to compute the names and sets
IScope.NULLSCOPE
as parent scope
public static IScope scopeFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements, IScope outer)
SimpleAttributeResolver.NAME_RESOLVER
to compute the names
public static <T extends org.eclipse.emf.ecore.EObject> IScope scopeFor(java.lang.Iterable<? extends T> elements, com.google.common.base.Function<T,QualifiedName> nameComputation, IScope outer)
public static java.lang.Iterable<IEObjectDescription> scopedElementsFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements)
Iterable
of EObject
s into an Iterable
of IEObjectDescription
s computing
the EAttribute
'name' to compute the IEObjectDescription
's name. If not existent the object is
filtered out.
public static <T extends org.eclipse.emf.ecore.EObject> java.lang.Iterable<IEObjectDescription> scopedElementsFor(java.lang.Iterable<? extends T> elements, com.google.common.base.Function<T,QualifiedName> nameComputation)
Iterable
of EObject
s into an Iterable
of IEObjectDescription
s computing
the name of the elements using the passed Function
If the passed function returns null the object is
filtered out.
public static <T> com.google.common.collect.Multimap<T,IEObjectDescription> index(java.lang.Iterable<IEObjectDescription> descriptions, com.google.common.base.Function<IEObjectDescription,T> indexer)
public static com.google.common.collect.Multimap<QualifiedName,IEObjectDescription> index(java.lang.Iterable<IEObjectDescription> descriptions)
public static java.lang.Iterable<IEObjectDescription> filterDuplicates(java.lang.Iterable<IEObjectDescription> filtered)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |