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.ResourceSetImplA 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 classXtextResourceSet.ResourcesListadds the added resource to theResourceSetImpl.getURIResourceMap().protected classXtextResourceSet.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 voidaddLoadOption(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_TIMEOUTprotected XtextResourceSet.ResourcesListcreateResourceList()Create the concrete list that will contain the resources.java.lang.ObjectgetClasspathURIContext()IClasspathUriResolvergetClasspathUriResolver()intgetModificationStamp()java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI>getNormalizationMap()org.eclipse.emf.ecore.resource.ResourcegetResource(org.eclipse.emf.common.util.URI uri, boolean loadOnDemand)protected XtextResourceSet.UriChangeListenergetUriChangeListener()org.eclipse.emf.ecore.resource.URIConvertergetURIConverter()protected voidinitializeDefaultLoadOptions()Adds aXtextPlatformResourceURIHandlerto the default load options of this resource set.booleanisOutdated()voidmarkOutdated()voidmarkSynced()protected voidregisterURI(org.eclipse.emf.ecore.resource.Resource resource)voidremoveLoadOption(java.lang.Object key)voidsetClasspathURIContext(java.lang.Object classpathURIContext)voidsetClasspathUriResolver(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 aXtextPlatformResourceURIHandlerto 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:
getResourcein interfaceorg.eclipse.emf.ecore.resource.ResourceSet- Overrides:
getResourcein classorg.eclipse.emf.ecore.resource.impl.ResourceSetImpl
-
getURIConverter
public org.eclipse.emf.ecore.resource.URIConverter getURIConverter()
- Specified by:
getURIConverterin interfaceorg.eclipse.emf.ecore.resource.ResourceSet- Overrides:
getURIConverterin 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)
-
-