Package org.eclipse.xtext.resource.impl
Class LiveShadowedResourceDescriptions
- java.lang.Object
-
- org.eclipse.xtext.resource.impl.AbstractCompoundSelectable
-
- org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions
-
- org.eclipse.xtext.resource.impl.LiveShadowedResourceDescriptions
-
- All Implemented Interfaces:
IResourceDescriptions,IResourceDescriptions.IContextAware,IResourceDescriptions.IResourceSetAware,ISelectable,IShadowedResourceDescriptions
- Direct Known Subclasses:
LiveShadowedChunkedResourceDescriptions
public class LiveShadowedResourceDescriptions extends ResourceSetBasedResourceDescriptions implements IShadowedResourceDescriptions
- Since:
- 2.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.resource.IResourceDescriptions
IResourceDescriptions.IContextAware, IResourceDescriptions.IResourceSetAware, IResourceDescriptions.NullImpl
-
-
Constructor Summary
Constructors Constructor Description LiveShadowedResourceDescriptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<IResourceDescription>getAllResourceDescriptions()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)IResourceDescriptionsgetGlobalDescriptions()IResourceDescriptionsgetLocalDescriptions()IResourceDescriptiongetResourceDescription(org.eclipse.emf.common.util.URI uri)Returns the resource descriptions for the given URI.org.eclipse.emf.ecore.resource.ResourceSetgetResourceSet()protected booleanhasDescription(org.eclipse.emf.common.util.URI uri)booleanisEmpty()Clients may want to check the selectable to skip its processing in case it is empty.protected booleanisExistingOrRenamedResourceURI(org.eclipse.emf.common.util.URI uri)booleanisShadowed(org.eclipse.emf.ecore.EClass type, QualifiedName name, boolean ignoreCase)protected java.lang.Iterable<IEObjectDescription>joinIterables(java.lang.Iterable<IEObjectDescription> liveDescriptions, java.lang.Iterable<IEObjectDescription> persistentDescriptions)voidsetContext(org.eclipse.emf.common.notify.Notifier ctx)voidsetGlobalDescriptions(IResourceDescriptions globalDescriptions)voidsetLocalDescriptions(ResourceSetBasedResourceDescriptions localDescriptions)-
Methods inherited from class org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions
getData, getSelectables, setData, setRegistry, toString
-
-
-
-
Method Detail
-
setContext
public void setContext(org.eclipse.emf.common.notify.Notifier ctx)
- Specified by:
setContextin interfaceIResourceDescriptions.IContextAware- Overrides:
setContextin classResourceSetBasedResourceDescriptions
-
getResourceDescription
public IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
Description copied from interface:IResourceDescriptionsReturns the resource descriptions for the given URI.- Specified by:
getResourceDescriptionin interfaceIResourceDescriptions- Overrides:
getResourceDescriptionin classResourceSetBasedResourceDescriptions
-
getAllResourceDescriptions
public java.lang.Iterable<IResourceDescription> getAllResourceDescriptions()
- Specified by:
getAllResourceDescriptionsin interfaceIResourceDescriptions- Overrides:
getAllResourceDescriptionsin classResourceSetBasedResourceDescriptions
-
isEmpty
public boolean isEmpty()
Description copied from interface:ISelectableClients 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 returnfalseif it is too expensive to compute the actual result.- Specified by:
isEmptyin interfaceISelectable- Overrides:
isEmptyin classResourceSetBasedResourceDescriptions- Returns:
trueif the selectable does not provide any descriptions.
-
getResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
- Specified by:
getResourceSetin interfaceIResourceDescriptions.IResourceSetAware- Overrides:
getResourceSetin classResourceSetBasedResourceDescriptions
-
hasDescription
protected boolean hasDescription(org.eclipse.emf.common.util.URI uri)
- Overrides:
hasDescriptionin classResourceSetBasedResourceDescriptions
-
isExistingOrRenamedResourceURI
protected boolean isExistingOrRenamedResourceURI(org.eclipse.emf.common.util.URI uri)
-
getExportedObjects
public java.lang.Iterable<IEObjectDescription> getExportedObjects()
- Specified by:
getExportedObjectsin interfaceISelectable- Overrides:
getExportedObjectsin classResourceSetBasedResourceDescriptions- 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:
getExportedObjectsin interfaceISelectable- Overrides:
getExportedObjectsin classResourceSetBasedResourceDescriptions- Returns:
- all elements which match the given qualified name and type. May not be
null.
-
joinIterables
protected java.lang.Iterable<IEObjectDescription> joinIterables(java.lang.Iterable<IEObjectDescription> liveDescriptions, java.lang.Iterable<IEObjectDescription> persistentDescriptions)
-
getExportedObjectsByType
public java.lang.Iterable<IEObjectDescription> getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
- Specified by:
getExportedObjectsByTypein interfaceISelectable- Overrides:
getExportedObjectsByTypein classResourceSetBasedResourceDescriptions- 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:
getExportedObjectsByObjectin interfaceISelectable- Overrides:
getExportedObjectsByObjectin classResourceSetBasedResourceDescriptions- Returns:
- all elements which match the given instance. May not be
null.
-
getLocalDescriptions
public IResourceDescriptions getLocalDescriptions()
- Since:
- 2.6
-
getGlobalDescriptions
public IResourceDescriptions getGlobalDescriptions()
- Since:
- 2.6
-
setGlobalDescriptions
public void setGlobalDescriptions(IResourceDescriptions globalDescriptions)
- Since:
- 2.6
-
setLocalDescriptions
public void setLocalDescriptions(ResourceSetBasedResourceDescriptions localDescriptions)
- Since:
- 2.6
-
isShadowed
public boolean isShadowed(org.eclipse.emf.ecore.EClass type, QualifiedName name, boolean ignoreCase)- Specified by:
isShadowedin interfaceIShadowedResourceDescriptions- Returns:
- whether an
EObjectDescriptionexists that is shadowed
-
-