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, uriResourceMapFields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAGFields inherited from interface org.eclipse.emf.compare.ide.internal.utils.DisposableResourceSet
XTEXT_SCOPING_LIVE_SCOPE_OPTIONFields inherited from interface org.eclipse.emf.ecore.resource.ResourceSet
RESOURCE_SET__RESOURCES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateResource(URI uri) createResource(URI uri, String contentType) voiddispose()This method should be called when the resource set is no longer needed.getResource(URI uri, boolean loadOnDemand) protected voidhandleDemandLoadException(Resource resource, IOException exception) loadResource(URI uri) This will load the given URI as an EMF Resource.voidUnload 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, toStringMethods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, eBasicAdapters, eDeliver, eSetDeliverMethods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliverMethods 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:
getResourcein interfaceResourceSet- Overrides:
getResourcein classResourceSetImpl- See Also:
-
createResource
- Specified by:
createResourcein interfaceResourceSet- Overrides:
createResourcein classResourceSetImpl- See Also:
-
createResource
- Specified by:
createResourcein interfaceResourceSet- Overrides:
createResourcein classResourceSetImpl- See Also:
-
getResources
- Specified by:
getResourcesin interfaceResourceSet- Overrides:
getResourcesin classResourceSetImpl- See Also:
-
getLoadOptions
- Specified by:
getLoadOptionsin interfaceResourceSet- Overrides:
getLoadOptionsin classResourceSetImpl- See Also:
-
dispose
public void dispose()This method should be called when the resource set is no longer needed.- Specified by:
disposein interfaceDisposableResourceSet
-