Class FilterUriContainer
- java.lang.Object
-
- org.eclipse.xtext.resource.impl.AbstractCompoundSelectable
-
- org.eclipse.xtext.resource.impl.AbstractContainer
-
- org.eclipse.xtext.resource.containers.FilterUriContainer
-
- All Implemented Interfaces:
IContainer
,ISelectable
public class FilterUriContainer extends AbstractContainer
A container that virtually removes aresource description
with a givenuri
from another container.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.resource.IContainer
IContainer.Manager
-
-
Field Summary
-
Fields inherited from interface org.eclipse.xtext.resource.IContainer
NULL_CONTAINER
-
-
Constructor Summary
Constructors Constructor Description FilterUriContainer(org.eclipse.emf.common.util.URI filterMe, IContainer delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<IEObjectDescription>
getExportedObjects(org.eclipse.emf.ecore.EClass type, QualifiedName qualifiedName, boolean ignoreCase)
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.-
Methods inherited from class org.eclipse.xtext.resource.impl.AbstractContainer
getExportedObjectsByObject, getSelectables
-
Methods inherited from class org.eclipse.xtext.resource.impl.AbstractCompoundSelectable
getExportedObjects
-
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.ISelectable
getExportedObjects
-
-
-
-
Constructor Detail
-
FilterUriContainer
public FilterUriContainer(org.eclipse.emf.common.util.URI filterMe, IContainer delegate)
-
-
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
- Overrides:
isEmpty
in classAbstractCompoundSelectable
- Returns:
true
if the selectable does not provide any descriptions.
-
hasResourceDescription
public boolean hasResourceDescription(org.eclipse.emf.common.util.URI uri)
- Specified by:
hasResourceDescription
in interfaceIContainer
- Overrides:
hasResourceDescription
in classAbstractContainer
- Returns:
true
if the container can provide aresource description with the given uri
.
-
getResourceDescriptionCount
public int getResourceDescriptionCount()
- Specified by:
getResourceDescriptionCount
in interfaceIContainer
- Overrides:
getResourceDescriptionCount
in classAbstractContainer
- Returns:
- the total number of resource descriptions returned by
IContainer.getResourceDescriptions()
-
getResourceDescriptions
public java.lang.Iterable<IResourceDescription> getResourceDescriptions()
- Returns:
- the
IResourceDescription
contained in this container. The result is nevernull
. The result may be a cached view on the actual content of the underlying resources.
-
getExportedObjects
public java.lang.Iterable<IEObjectDescription> getExportedObjects(org.eclipse.emf.ecore.EClass type, QualifiedName qualifiedName, boolean ignoreCase)
- Specified by:
getExportedObjects
in interfaceISelectable
- Overrides:
getExportedObjects
in classAbstractCompoundSelectable
- Returns:
- all elements which match the given qualified name and type. May not be
null
.
-
getExportedObjectsByType
public java.lang.Iterable<IEObjectDescription> getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
- Specified by:
getExportedObjectsByType
in interfaceISelectable
- Overrides:
getExportedObjectsByType
in classAbstractCompoundSelectable
- Returns:
- all elements which match the given type. May not be
null
.
-
getResourceDescription
public IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
- Specified by:
getResourceDescription
in interfaceIContainer
- Overrides:
getResourceDescription
in classAbstractContainer
- Returns:
- the
IResourceDescription
for the given URI, or null is this container does not contain such anIResourceDescription
. The result may be a cached view on the actual content of the underlying resource.
-
-