Package org.eclipse.xtext.resource
Class SynchronizedXtextResourceSet
- 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
-
- org.eclipse.xtext.resource.SynchronizedXtextResourceSet
-
- All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier
,org.eclipse.emf.ecore.resource.ResourceSet
,ISynchronizable<SynchronizedXtextResourceSet>
public class SynchronizedXtextResourceSet extends XtextResourceSet implements ISynchronizable<SynchronizedXtextResourceSet>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.resource.XtextResourceSet
XtextResourceSet.ResourcesList, 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 inherited from class org.eclipse.xtext.resource.XtextResourceSet
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 SynchronizedXtextResourceSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.emf.ecore.resource.Resource
createResource(org.eclipse.emf.common.util.URI uri)
protected XtextResourceSet.ResourcesList
createResourceList()
Create the concrete list that will contain the resources.<Result> Result
execute(org.eclipse.xtext.util.concurrent.IUnitOfWork<Result,? super SynchronizedXtextResourceSet> unit)
Execute the unit of work in a context that allows for modification.java.lang.Object
getLock()
Returns a synchronization lock that works for the complete resource set.org.eclipse.emf.ecore.resource.Resource
getResource(org.eclipse.emf.common.util.URI uri, boolean loadOnDemand)
org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.resource.Resource>
getResources()
protected void
registerURI(org.eclipse.emf.ecore.resource.Resource resource)
-
Methods inherited from class org.eclipse.xtext.resource.XtextResourceSet
addLoadOption, addTimeout, getClasspathURIContext, getClasspathUriResolver, getModificationStamp, getNormalizationMap, getUriChangeListener, getURIConverter, initializeDefaultLoadOptions, isOutdated, markOutdated, markSynced, removeLoadOption, setClasspathURIContext, setClasspathUriResolver
-
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
createResource, delegatedGetResource, demandCreateResource, demandLoad, demandLoadHelper, getAdapterFactories, getAllContents, getEObject, getLoadOptions, getPackageRegistry, getResourceFactoryRegistry, 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
-
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 classXtextResourceSet
-
createResource
public org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI uri)
- Specified by:
createResource
in interfaceorg.eclipse.emf.ecore.resource.ResourceSet
- Overrides:
createResource
in classorg.eclipse.emf.ecore.resource.impl.ResourceSetImpl
-
getResources
public org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.resource.Resource> getResources()
- Specified by:
getResources
in interfaceorg.eclipse.emf.ecore.resource.ResourceSet
- Overrides:
getResources
in classorg.eclipse.emf.ecore.resource.impl.ResourceSetImpl
-
registerURI
protected void registerURI(org.eclipse.emf.ecore.resource.Resource resource)
- Overrides:
registerURI
in classXtextResourceSet
-
getLock
public java.lang.Object getLock()
Returns a synchronization lock that works for the complete resource set.- Specified by:
getLock
in interfaceISynchronizable<SynchronizedXtextResourceSet>
- Returns:
- the lock instance.
- Since:
- 2.4
-
execute
public <Result> Result execute(org.eclipse.xtext.util.concurrent.IUnitOfWork<Result,? super SynchronizedXtextResourceSet> unit) throws java.lang.Exception
Execute the unit of work in a context that allows for modification.- Specified by:
execute
in interfaceISynchronizable<SynchronizedXtextResourceSet>
- Parameters:
unit
- the action to perform. May not benull
- Throws:
java.lang.Exception
- the exception that was thrown by the unit.- Since:
- 2.4
-
createResourceList
protected XtextResourceSet.ResourcesList createResourceList()
Description copied from class:XtextResourceSet
Create the concrete list that will contain the resources.- Overrides:
createResourceList
in classXtextResourceSet
- Since:
- 2.4
-
-