public class StateBasedContainer extends ResourceDescriptionsBasedContainer
container state is used to decide about the actually
contained resource descriptions.IContainer.ManagerNULL_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() |
protected IContainerState |
getState() |
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, setUriToDescriptionCacheEnabledgetSelectablespublic StateBasedContainer(IResourceDescriptions descriptions, IContainerState state)
protected final IContainerState getState()
protected java.lang.Iterable<IEObjectDescription> filterByURI(java.lang.Iterable<IEObjectDescription> unfiltered)
filterByURI in class ResourceDescriptionsBasedContainerpublic boolean hasResourceDescription(org.eclipse.emf.common.util.URI uri)
hasResourceDescription in interface IContainerhasResourceDescription in class ResourceDescriptionsBasedContainertrue if the container can provide a resource description with the given uri.public int getResourceDescriptionCount()
getResourceDescriptionCount in interface IContainergetResourceDescriptionCount in class ResourceDescriptionsBasedContainerIContainer.getResourceDescriptions()public boolean isEmpty()
ISelectablefalse if it is too expensive to compute the actual result.isEmpty in interface ISelectableisEmpty in class AbstractCompoundSelectabletrue if the selectable does not provide any descriptions.public IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
getResourceDescription in interface IContainergetResourceDescription in class ResourceDescriptionsBasedContainerIResourceDescription 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 IContainergetResourceDescriptions in class ResourceDescriptionsBasedContainerIResourceDescription 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 ResourceDescriptionsBasedContainerpublic java.lang.Iterable<IEObjectDescription> getExportedObjects()
getExportedObjects in interface ISelectablegetExportedObjects in class AbstractCompoundSelectablenull.public java.lang.Iterable<IEObjectDescription> getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
getExportedObjectsByType in interface ISelectablegetExportedObjectsByType in class ResourceDescriptionsBasedContainernull.public java.lang.Iterable<IEObjectDescription> getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object)
getExportedObjectsByObject in interface ISelectablegetExportedObjectsByObject in class AbstractContainernull.public java.lang.Iterable<IEObjectDescription> getExportedObjects(org.eclipse.emf.ecore.EClass type, QualifiedName qualifiedName, boolean ignoreCase)
getExportedObjects in interface ISelectablegetExportedObjects in class ResourceDescriptionsBasedContainernull.public java.lang.String toString()
toString in class java.lang.Object