public class StateBasedContainer extends ResourceDescriptionsBasedContainer
container state
is used to decide about the actually
contained resource descriptions.IContainer.Manager
NULL_CONTAINER
Constructor and Description |
---|
StateBasedContainer(IResourceDescriptions descriptions,
IContainerState state) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<org.eclipse.emf.common.util.URI,IResourceDescription> |
doGetUriToDescription() |
protected java.lang.Iterable<IEObjectDescription> |
filterByURI(java.lang.Iterable<IEObjectDescription> unfiltered) |
java.lang.Iterable<IEObjectDescription> |
getExportedObjects() |
java.lang.Iterable<IEObjectDescription> |
getExportedObjects(org.eclipse.emf.ecore.EClass type,
QualifiedName qualifiedName,
boolean ignoreCase) |
java.lang.Iterable<IEObjectDescription> |
getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object) |
java.lang.Iterable<IEObjectDescription> |
getExportedObjectsByType(org.eclipse.emf.ecore.EClass type) |
IResourceDescription |
getResourceDescription(org.eclipse.emf.common.util.URI uri) |
int |
getResourceDescriptionCount() |
java.lang.Iterable<IResourceDescription> |
getResourceDescriptions() |
boolean |
hasResourceDescription(org.eclipse.emf.common.util.URI uri) |
boolean |
isEmpty()
Clients may want to check the selectable to skip its processing in case it is empty.
|
java.lang.String |
toString() |
contains, descriptionsChanged, getDescriptions, getUriToDescription, isUriToDescriptionCacheEnabled, setUriToDescriptionCacheEnabled
getSelectables
public StateBasedContainer(IResourceDescriptions descriptions, IContainerState state)
protected java.lang.Iterable<IEObjectDescription> filterByURI(java.lang.Iterable<IEObjectDescription> unfiltered)
filterByURI
in class ResourceDescriptionsBasedContainer
public boolean hasResourceDescription(org.eclipse.emf.common.util.URI uri)
hasResourceDescription
in interface IContainer
hasResourceDescription
in class ResourceDescriptionsBasedContainer
true
if the container can provide a resource description with the given uri
.public int getResourceDescriptionCount()
getResourceDescriptionCount
in interface IContainer
getResourceDescriptionCount
in class ResourceDescriptionsBasedContainer
IContainer.getResourceDescriptions()
public boolean isEmpty()
ISelectable
false
if it is too expensive to compute the actual result.isEmpty
in interface ISelectable
isEmpty
in class AbstractCompoundSelectable
true
if the selectable does not provide any descriptions.public IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
getResourceDescription
in interface IContainer
getResourceDescription
in class ResourceDescriptionsBasedContainer
IResourceDescription
for the given URI, or null is this container does
not contain such an IResourceDescription
.
The result may be a cached view on the actual content of the underlying resource.public java.lang.Iterable<IResourceDescription> getResourceDescriptions()
getResourceDescriptions
in interface IContainer
getResourceDescriptions
in class ResourceDescriptionsBasedContainer
IResourceDescription
contained in this container. The result is never
null
. The result may be a cached view on the actual content of the underlying resources.protected java.util.Map<org.eclipse.emf.common.util.URI,IResourceDescription> doGetUriToDescription()
doGetUriToDescription
in class ResourceDescriptionsBasedContainer
public java.lang.Iterable<IEObjectDescription> getExportedObjects()
getExportedObjects
in interface ISelectable
getExportedObjects
in class AbstractCompoundSelectable
null
.public java.lang.Iterable<IEObjectDescription> getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
getExportedObjectsByType
in interface ISelectable
getExportedObjectsByType
in class ResourceDescriptionsBasedContainer
null
.public java.lang.Iterable<IEObjectDescription> getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object)
getExportedObjectsByObject
in interface ISelectable
getExportedObjectsByObject
in class AbstractContainer
null
.public java.lang.Iterable<IEObjectDescription> getExportedObjects(org.eclipse.emf.ecore.EClass type, QualifiedName qualifiedName, boolean ignoreCase)
getExportedObjects
in interface ISelectable
getExportedObjects
in class ResourceDescriptionsBasedContainer
null
.public java.lang.String toString()
toString
in class java.lang.Object