Class SynchronizedResourceSet
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.emf.compare.ide.ui.internal.logical.resolver.SynchronizedResourceSet
- All Implemented Interfaces:
Notifier
,DisposableResourceSet
,ResourceSet
A thread-safe implementation of a ResourceSet that will prevent loading of resources unless explicitly
demanded through
loadResource(URI)
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
ResourceSetImpl.MappedResourceLocator, ResourceSetImpl.ResourceLocator, ResourceSetImpl.ResourcesEList<E extends Object & Resource>
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
BasicNotifierImpl.EAdapterList<E extends Object & Adapter>, BasicNotifierImpl.EObservableAdapterList, BasicNotifierImpl.EScannableAdapterList
-
Field Summary
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
adapterFactories, loadOptions, packageRegistry, resourceFactoryRegistry, resourceLocator, 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.compare.ide.internal.utils.DisposableResourceSet
XTEXT_SCOPING_LIVE_SCOPE_OPTION
Fields inherited from interface org.eclipse.emf.ecore.resource.ResourceSet
RESOURCE_SET__RESOURCES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateResource
(URI uri) createResource
(URI uri, String contentType) void
dispose()
This method should be called when the resource set is no longer needed.getResource
(URI uri, boolean loadOnDemand) protected void
handleDemandLoadException
(Resource resource, IOException exception) loadResource
(URI uri) This will load the given URI as an EMF Resource.void
Unload the given resource.Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
delegatedGetResource, demandCreateResource, demandLoad, demandLoadHelper, getAdapterFactories, getAllContents, getEObject, getPackageRegistry, getResourceFactoryRegistry, getURIConverter, getURIResourceMap, 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
Methods inherited from interface org.eclipse.emf.ecore.resource.ResourceSet
getAdapterFactories, getAllContents, getEObject, getPackageRegistry, getResourceFactoryRegistry, getURIConverter, setPackageRegistry, setResourceFactoryRegistry, setURIConverter
-
Constructor Details
-
SynchronizedResourceSet
Constructor.- Parameters:
proxyListener
- The listener to notify of proxy creations.
-
-
Method Details
-
loadResource
This will load the given URI as an EMF Resource.This is the only entry point within this resource set to load an EMF resource, and it will _only_ load the resource pointed at by
uri
, ignoring all cross-referenced resources (including containment proxies).- Parameters:
uri
- The URI to load as a resource.- Returns:
- The loaded Resource.
-
handleDemandLoadException
-
unload
Unload the given resource.- Parameters:
resource
- Resource to unlodmonitor
- Progress monito to use (currently unused)
-
getResource
- Specified by:
getResource
in interfaceResourceSet
- Overrides:
getResource
in classResourceSetImpl
- See Also:
-
createResource
- Specified by:
createResource
in interfaceResourceSet
- Overrides:
createResource
in classResourceSetImpl
- See Also:
-
createResource
- Specified by:
createResource
in interfaceResourceSet
- Overrides:
createResource
in classResourceSetImpl
- See Also:
-
getResources
- Specified by:
getResources
in interfaceResourceSet
- Overrides:
getResources
in classResourceSetImpl
- See Also:
-
getLoadOptions
- Specified by:
getLoadOptions
in interfaceResourceSet
- Overrides:
getLoadOptions
in classResourceSetImpl
- See Also:
-
dispose
public void dispose()This method should be called when the resource set is no longer needed.- Specified by:
dispose
in interfaceDisposableResourceSet
-