Class LiveShadowedChunkedContainer
- java.lang.Object
-
- org.eclipse.xtext.resource.containers.LiveShadowedChunkedContainer
-
- All Implemented Interfaces:
IContainer
,ISelectable
@Beta public class LiveShadowedChunkedContainer extends java.lang.Object implements IContainer
- Since:
- 2.14
-
-
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 LiveShadowedChunkedContainer(LiveShadowedChunkedResourceDescriptions descriptions, java.lang.String containerName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ResourceDescriptionsData
getChunk()
protected ChunkedResourceDescriptions
getChunkedResourceDescriptions()
protected java.lang.Iterable<IResourceDescription>
getContainedLocalDescriptions()
protected java.util.Set<org.eclipse.emf.common.util.URI>
getExistingOrRenamedResourceURIs()
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 IProjectConfig
getProjectConfig()
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)
protected boolean
isContained(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.
-
-
-
Constructor Detail
-
LiveShadowedChunkedContainer
public LiveShadowedChunkedContainer(LiveShadowedChunkedResourceDescriptions descriptions, java.lang.String containerName)
-
-
Method Detail
-
getChunkedResourceDescriptions
protected ChunkedResourceDescriptions getChunkedResourceDescriptions()
-
getProjectConfig
protected IProjectConfig getProjectConfig()
-
getChunk
protected ResourceDescriptionsData getChunk()
-
getContainedLocalDescriptions
protected java.lang.Iterable<IResourceDescription> getContainedLocalDescriptions()
-
isContained
protected boolean isContained(org.eclipse.emf.common.util.URI uri)
-
getResourceDescription
public IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
- Specified by:
getResourceDescription
in interfaceIContainer
- 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.
-
getResourceDescriptionCount
public int getResourceDescriptionCount()
- Specified by:
getResourceDescriptionCount
in interfaceIContainer
- Returns:
- the total number of resource descriptions returned by
IContainer.getResourceDescriptions()
-
getResourceDescriptions
public java.lang.Iterable<IResourceDescription> getResourceDescriptions()
- Specified by:
getResourceDescriptions
in interfaceIContainer
- 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.
-
hasResourceDescription
public boolean hasResourceDescription(org.eclipse.emf.common.util.URI uri)
- Specified by:
hasResourceDescription
in interfaceIContainer
- Returns:
true
if the container can provide aresource description with the given uri
.
-
getExportedObjects
public java.lang.Iterable<IEObjectDescription> getExportedObjects()
- Specified by:
getExportedObjects
in interfaceISelectable
- Returns:
- all exported elements. 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
.
-
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
.
-
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
.
-
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.
-
getExistingOrRenamedResourceURIs
protected java.util.Set<org.eclipse.emf.common.util.URI> getExistingOrRenamedResourceURIs()
-
-