Package org.eclipse.xtext.resource.impl
Class AbstractResourceDescription
- java.lang.Object
-
- org.eclipse.xtext.resource.impl.AbstractResourceDescription
-
- All Implemented Interfaces:
IResourceDescription
,ISelectable
- Direct Known Subclasses:
DefaultResourceDescription
,ResolvedResourceDescription
,SerializableResourceDescription
public abstract class AbstractResourceDescription extends java.lang.Object implements IResourceDescription
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.resource.IResourceDescription
IResourceDescription.CoarseGrainedEvent, IResourceDescription.Delta, IResourceDescription.Event, IResourceDescription.Manager
-
-
Field Summary
Fields Modifier and Type Field Description protected EObjectDescriptionLookUp
lookup
-
Constructor Summary
Constructors Constructor Description AbstractResourceDescription()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.List<IEObjectDescription>
computeExportedObjects()
java.lang.Iterable<IEObjectDescription>
getExportedObjects()
java.lang.Iterable<IEObjectDescription>
getExportedObjects(org.eclipse.emf.ecore.EClass type, QualifiedName name, boolean ignoreCase)
java.lang.Iterable<IEObjectDescription>
getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object)
java.lang.Iterable<IEObjectDescription>
getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
protected EObjectDescriptionLookUp
getLookUp()
protected org.eclipse.emf.common.util.URI
getNormalizedURI(org.eclipse.emf.ecore.resource.Resource resource)
boolean
isEmpty()
Clients may want to check the selectable to skip its processing in case it is empty.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.resource.IResourceDescription
getImportedNames, getReferenceDescriptions, getURI
-
-
-
-
Field Detail
-
lookup
protected EObjectDescriptionLookUp lookup
-
-
Method Detail
-
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 returnfalse
if it is too expensive to compute the actual result.- Specified by:
isEmpty
in interfaceISelectable
- Returns:
true
if the selectable does not provide any descriptions.
-
getExportedObjects
public java.lang.Iterable<IEObjectDescription> getExportedObjects()
- Specified by:
getExportedObjects
in interfaceIResourceDescription
- Specified by:
getExportedObjects
in interfaceISelectable
- Returns:
- descriptions of all EObjects provided by the given Resource. The result is expected to return any
combination of
name
andeObjectOrProxy
only once as anIEObjectDescription
. The order of the exported objects matters.
-
getExportedObjectsByType
public java.lang.Iterable<IEObjectDescription> getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
- Specified by:
getExportedObjectsByType
in interfaceISelectable
- 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 interfaceISelectable
- 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 interfaceISelectable
- Returns:
- all elements which match the given qualified name and type. May not be
null
.
-
computeExportedObjects
protected abstract java.util.List<IEObjectDescription> computeExportedObjects()
-
getLookUp
protected EObjectDescriptionLookUp getLookUp()
-
getNormalizedURI
protected org.eclipse.emf.common.util.URI getNormalizedURI(org.eclipse.emf.ecore.resource.Resource resource)
-
-