org.eclipse.xtext.resource
Class XtextResourceSet

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.common.notify.impl.NotifierImpl
          extended by org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
              extended by 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 a ResourceSetImpl.getURIResourceMap() containing the resource's URI as well as the normalized version of it as a key. It assumes that the URI of a resource never changes while contained in the ResourceSetImpl.getResources() list.

Author:
Jan Köhnlein, Sven Efftinge

Nested Class Summary
protected  class XtextResourceSet.ResourcesList
          adds the added resource to the ResourceSetImpl.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.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>
 
Field Summary
 
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
adapterFactories, loadOptions, packageRegistry, resourceFactoryRegistry, resources, uriConverter, uriResourceMap
 
Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG
 
Fields inherited from interface org.eclipse.emf.ecore.resource.ResourceSet
RESOURCE_SET__RESOURCES
 
Constructor Summary
XtextResourceSet()
           
 
Method Summary
 void addLoadOption(java.lang.Object key, java.lang.Object value)
           
 java.lang.Object getClasspathURIContext()
           
 IClasspathUriResolver getClasspathUriResolver()
           
 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 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Constructor Detail

XtextResourceSet

public XtextResourceSet()
Method Detail

getUriChangeListener

protected XtextResourceSet.UriChangeListener getUriChangeListener()
Since:
2.3

registerURI

protected void registerURI(org.eclipse.emf.ecore.resource.Resource resource)
Since:
2.3

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 interface org.eclipse.emf.ecore.resource.ResourceSet
Overrides:
getResource in class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl

getURIConverter

public org.eclipse.emf.ecore.resource.URIConverter getURIConverter()
Specified by:
getURIConverter in interface org.eclipse.emf.ecore.resource.ResourceSet
Overrides:
getURIConverter in class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl

getClasspathURIContext

public java.lang.Object getClasspathURIContext()

setClasspathURIContext

public void setClasspathURIContext(java.lang.Object classpathURIContext)

getClasspathUriResolver

public IClasspathUriResolver getClasspathUriResolver()

setClasspathUriResolver

public void setClasspathUriResolver(IClasspathUriResolver resolver)