org.eclipse.xtext.common.types.ui.notification
Class LayeredTypeResourceDescription
java.lang.Object
org.eclipse.xtext.common.types.ui.notification.LayeredTypeResourceDescription
- All Implemented Interfaces:
- IResourceDescription, ISelectable
public class LayeredTypeResourceDescription
- extends java.lang.Object
- implements IResourceDescription
A layered description enhances the
delegate with additionally exported objects.
- Author:
- Sebastian Zarnekow - Initial contribution and API
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LayeredTypeResourceDescription
public LayeredTypeResourceDescription(TypeResourceDescription delegate,
java.util.List<IEObjectDescription> additionallyExported)
getImportedNames
public java.lang.Iterable<QualifiedName> getImportedNames()
- Specified by:
getImportedNames in interface IResourceDescription
- Returns:
- the list of names the described resource depends depends on.
getReferenceDescriptions
public java.lang.Iterable<IReferenceDescription> getReferenceDescriptions()
- Specified by:
getReferenceDescriptions in interface IResourceDescription
- Returns:
- the list of all references contained in the underlying resource.
getURI
public org.eclipse.emf.common.util.URI getURI()
- Specified by:
getURI in interface IResourceDescription
- Returns:
- the uri of the described resource. Will not return
null.
getExportedObjects
public java.lang.Iterable<IEObjectDescription> getExportedObjects()
- Specified by:
getExportedObjects in interface IResourceDescription- Specified by:
getExportedObjects in interface ISelectable
- Returns:
- descriptions of all EObjects provided by the given Resource. The result is expected to return any
combination of
name and eObjectOrProxy only once as an
IEObjectDescription. The order of the exported objects matters.
isEmpty
public boolean isEmpty()
- Description copied from interface:
ISelectable
- Clients may want to check the selectable to skip its processing in case it is empty.
Implementations should be fast and not require expensive precalculation. Selectable may
return
false if it is too expensive to compute the actual result.
- Specified by:
isEmpty in interface ISelectable
- Returns:
true if the selectable does not provide any descriptions.
getExportedObjectsByType
public java.lang.Iterable<IEObjectDescription> getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
- Specified by:
getExportedObjectsByType in interface ISelectable
- Returns:
- all elements which match the given type. May not be
null.
getExportedObjectsByObject
public java.lang.Iterable<IEObjectDescription> getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object)
- Specified by:
getExportedObjectsByObject in interface ISelectable
- Returns:
- all elements which match the given instance. May not be
null.
getExportedObjects
public java.lang.Iterable<IEObjectDescription> getExportedObjects(org.eclipse.emf.ecore.EClass type,
QualifiedName name,
boolean ignoreCase)
- Specified by:
getExportedObjects in interface ISelectable
- Returns:
- all elements which match the given qualified name and type. May not be
null.