Package org.eclipse.xtext.resource.impl
Class EagerResourceSetBasedResourceDescriptions
- java.lang.Object
-
- org.eclipse.xtext.resource.impl.AbstractCompoundSelectable
-
- org.eclipse.xtext.resource.impl.EagerResourceSetBasedResourceDescriptions
-
- All Implemented Interfaces:
IResourceDescriptions,IResourceDescriptions.IContextAware,IResourceDescriptions.IResourceSetAware,ISelectable
public class EagerResourceSetBasedResourceDescriptions extends AbstractCompoundSelectable implements IResourceDescriptions.IContextAware, IResourceDescriptions.IResourceSetAware
An implementation ofIResourceDescriptionswhich indexes a given resource set the first time it is used (i.e.getAllResourceDescriptions()is called).- Since:
- 2.4
-
-
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 EagerResourceSetBasedResourceDescriptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<IResourceDescription>getAllResourceDescriptions()IResourceDescriptiongetResourceDescription(org.eclipse.emf.common.util.URI uri)Returns the resource descriptions for the given URI.org.eclipse.emf.ecore.resource.ResourceSetgetResourceSet()protected java.lang.Iterable<? extends ISelectable>getSelectables()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.voidsetContext(org.eclipse.emf.common.notify.Notifier ctx)voidsetRegistry(IResourceServiceProvider.Registry registry)java.lang.StringtoString()-
Methods inherited from class org.eclipse.xtext.resource.impl.AbstractCompoundSelectable
getExportedObjects, getExportedObjects, getExportedObjectsByObject, getExportedObjectsByType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.resource.ISelectable
getExportedObjects, getExportedObjects, getExportedObjectsByObject, getExportedObjectsByType
-
-
-
-
Method Detail
-
getAllResourceDescriptions
public java.lang.Iterable<IResourceDescription> getAllResourceDescriptions()
- Specified by:
getAllResourceDescriptionsin interfaceIResourceDescriptions
-
setRegistry
public void setRegistry(IResourceServiceProvider.Registry registry)
-
getResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
- Specified by:
getResourceSetin interfaceIResourceDescriptions.IResourceSetAware
-
getSelectables
protected java.lang.Iterable<? extends ISelectable> getSelectables()
- Specified by:
getSelectablesin classAbstractCompoundSelectable
-
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 classAbstractCompoundSelectable- Returns:
trueif the selectable does not provide any descriptions.
-
hasDescription
protected boolean hasDescription(org.eclipse.emf.common.util.URI uri)
- Since:
- 2.1
-
setContext
public void setContext(org.eclipse.emf.common.notify.Notifier ctx)
- Specified by:
setContextin interfaceIResourceDescriptions.IContextAware
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
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
-
-