Package org.eclipse.xtext.resource
Class XtextResourceSet
- java.lang.Object
-
- org.eclipse.emf.common.notify.impl.BasicNotifierImpl
-
- org.eclipse.emf.common.notify.impl.NotifierImpl
-
- org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
-
- org.eclipse.xtext.resource.XtextResourceSet
-
- All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier
,org.eclipse.emf.ecore.resource.ResourceSet
- Direct Known Subclasses:
ResourceSetReferencingResourceSetImpl
,SynchronizedXtextResourceSet
public class XtextResourceSet extends org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
A resource set that is capable of resolving classpath URIs. It maintains aResourceSetImpl.getURIResourceMap()
containing the resource's URI as well as the normalized version of it as a key. The superset of actual and normalized resource URIs must be unique within the same resource set.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
XtextResourceSet.ResourcesList
adds the added resource to theResourceSetImpl.getURIResourceMap()
.protected class
XtextResourceSet.UriChangeListener
-
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.MappedResourceLocator, org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourceLocator, org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourcesEList<E extends java.lang.Object & org.eclipse.emf.ecore.resource.Resource>
-
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterList
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI>
normalizationMap
-
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
adapterFactories, loadOptions, packageRegistry, resourceFactoryRegistry, resourceLocator, resources, uriConverter, uriResourceMap
-
-
Constructor Summary
Constructors Constructor Description XtextResourceSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLoadOption(java.lang.Object key, java.lang.Object value)
protected java.util.Map<?,?>
addTimeout(java.util.Map<?,?> options)
returns a copy of the given map containing a timeout of 500ms if the given option map did not already specify aURIConverter.OPTION_TIMEOUT
protected XtextResourceSet.ResourcesList
createResourceList()
Create the concrete list that will contain the resources.java.lang.Object
getClasspathURIContext()
IClasspathUriResolver
getClasspathUriResolver()
int
getModificationStamp()
java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI>
getNormalizationMap()
org.eclipse.emf.ecore.resource.Resource
getResource(org.eclipse.emf.common.util.URI uri, boolean loadOnDemand)
protected XtextResourceSet.UriChangeListener
getUriChangeListener()
org.eclipse.emf.ecore.resource.URIConverter
getURIConverter()
protected void
initializeDefaultLoadOptions()
Adds aXtextPlatformResourceURIHandler
to the default load options of this resource set.boolean
isOutdated()
void
markOutdated()
void
markSynced()
protected void
registerURI(org.eclipse.emf.ecore.resource.Resource resource)
void
removeLoadOption(java.lang.Object key)
void
setClasspathURIContext(java.lang.Object classpathURIContext)
void
setClasspathUriResolver(IClasspathUriResolver resolver)
-
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
createResource, createResource, delegatedGetResource, demandCreateResource, demandLoad, demandLoadHelper, getAdapterFactories, getAllContents, getEObject, getLoadOptions, getPackageRegistry, getResourceFactoryRegistry, getResources, getURIResourceMap, handleDemandLoadException, setPackageRegistry, setResourceFactoryRegistry, setURIConverter, setURIResourceMap, toString
-
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, eBasicAdapters, eDeliver, eSetDeliver
-
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
-
-
-
-
Method Detail
-
getNormalizationMap
public java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> getNormalizationMap()
- Since:
- 2.7
-
markOutdated
public void markOutdated()
- Since:
- 2.8
-
markSynced
public void markSynced()
- Since:
- 2.8
-
isOutdated
public boolean isOutdated()
- Since:
- 2.8
-
getModificationStamp
public int getModificationStamp()
- Since:
- 2.8
-
getUriChangeListener
protected XtextResourceSet.UriChangeListener getUriChangeListener()
- Since:
- 2.3
-
registerURI
protected void registerURI(org.eclipse.emf.ecore.resource.Resource resource)
- Since:
- 2.3
-
initializeDefaultLoadOptions
protected void initializeDefaultLoadOptions()
Adds aXtextPlatformResourceURIHandler
to the default load options of this resource set. Clients who don't want this behavior can override this method.- Since:
- 2.4
-
createResourceList
protected XtextResourceSet.ResourcesList createResourceList()
Create the concrete list that will contain the resources.- Since:
- 2.4
-
addLoadOption
public void addLoadOption(java.lang.Object key, java.lang.Object value)
-
removeLoadOption
public void removeLoadOption(java.lang.Object key)
-
getResource
public org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.emf.common.util.URI uri, boolean loadOnDemand)
- Specified by:
getResource
in interfaceorg.eclipse.emf.ecore.resource.ResourceSet
- Overrides:
getResource
in classorg.eclipse.emf.ecore.resource.impl.ResourceSetImpl
-
getURIConverter
public org.eclipse.emf.ecore.resource.URIConverter getURIConverter()
- Specified by:
getURIConverter
in interfaceorg.eclipse.emf.ecore.resource.ResourceSet
- Overrides:
getURIConverter
in classorg.eclipse.emf.ecore.resource.impl.ResourceSetImpl
-
addTimeout
protected java.util.Map<?,?> addTimeout(java.util.Map<?,?> options)
returns a copy of the given map containing a timeout of 500ms if the given option map did not already specify aURIConverter.OPTION_TIMEOUT
- Since:
- 2.4
-
getClasspathURIContext
public java.lang.Object getClasspathURIContext()
-
setClasspathURIContext
public void setClasspathURIContext(java.lang.Object classpathURIContext)
-
getClasspathUriResolver
public IClasspathUriResolver getClasspathUriResolver()
-
setClasspathUriResolver
public void setClasspathUriResolver(IClasspathUriResolver resolver)
-
-