@Beta public final class NotLoadingResourceSet extends ResourceSetImpl implements DisposableResourceSet
StorageTraversal
, and only those
resources that are part of the traversal will be loaded. This will allow us to resolve the proxies between
these "traversed" resources.
This resource set will prevent loading any resources that is not part of the initial traversal. The only
exception to this rule is if one of the registered ILoadOnDemandPolicy
says otherwise. Users should
not try to add more resources into this resource set using any of the createResource methods.
ResourceSetImpl.MappedResourceLocator, ResourceSetImpl.ResourceLocator, ResourceSetImpl.ResourcesEList<E extends Object & Resource>
BasicNotifierImpl.EAdapterList<E extends Object & Adapter>, BasicNotifierImpl.EObservableAdapterList
adapterFactories, loadOptions, packageRegistry, resourceFactoryRegistry, resourceLocator, resources, uriConverter, uriResourceMap
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG
RESOURCE_SET__RESOURCES
Modifier and Type | Method and Description |
---|---|
static NotLoadingResourceSet |
create(StorageTraversal traversals,
IProgressMonitor monitor,
ResourceSetHookRegistry resourceSetHookRegistry)
Constructs a resource set to contain the resources described by the given traversals.
|
Resource |
createResource(URI uri,
String contentType) |
protected void |
demandLoadHelper(Resource resource) |
void |
dispose()
This method should be called when the resource set is no longer needed.
|
TreeIterator<Notifier> |
getAllContents() |
EObject |
getEObject(URI uri,
boolean loadOnDemand) |
Resource |
getResource(URI uri,
boolean loadOnDemand) |
EList<Resource> |
getResources() |
protected void |
handleDemandLoadException(Resource resource,
IOException exception) |
createResource, delegatedGetResource, demandCreateResource, demandLoad, getAdapterFactories, getLoadOptions, getPackageRegistry, getResourceFactoryRegistry, getURIConverter, getURIResourceMap, setPackageRegistry, setResourceFactoryRegistry, setURIConverter, setURIResourceMap, toString
eAdapters, eBasicAdapters, eDeliver, eSetDeliver
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createResource, getAdapterFactories, getLoadOptions, getPackageRegistry, getResourceFactoryRegistry, getURIConverter, setPackageRegistry, setResourceFactoryRegistry, setURIConverter
eAdapters, eDeliver, eNotify, eSetDeliver
public static NotLoadingResourceSet create(StorageTraversal traversals, IProgressMonitor monitor, ResourceSetHookRegistry resourceSetHookRegistry)
traversals
- All traversals we are to load.monitor
- the monitor to which progress will be reported.resourceSetHookRegistry
- A registry of IResourceSetHook
s that potentialy can hook on the new
ResourceSet
(can be null
if none).protected void demandLoadHelper(Resource resource)
demandLoadHelper
in class ResourceSetImpl
ResourceSetImpl.demandLoadHelper(org.eclipse.emf.ecore.resource.Resource)
protected void handleDemandLoadException(Resource resource, IOException exception)
public Resource getResource(URI uri, boolean loadOnDemand)
getResource
in interface ResourceSet
getResource
in class ResourceSetImpl
ResourceSetImpl.getResource(org.eclipse.emf.common.util.URI,
boolean)
public void dispose()
dispose
in interface DisposableResourceSet
DisposableResourceSet.dispose()
public Resource createResource(URI uri, String contentType)
createResource
in interface ResourceSet
createResource
in class ResourceSetImpl
ResourceSetImpl.createResource(org.eclipse.emf.common.util.URI,
java.lang.String)
public EObject getEObject(URI uri, boolean loadOnDemand)
getEObject
in interface ResourceSet
getEObject
in class ResourceSetImpl
ResourceSetImpl.getEObject(org.eclipse.emf.common.util.URI,
boolean)
public TreeIterator<Notifier> getAllContents()
getAllContents
in interface ResourceSet
getAllContents
in class ResourceSetImpl
ResourceSetImpl.getAllContents()
public EList<Resource> getResources()
getResources
in interface ResourceSet
getResources
in class ResourceSetImpl
ResourceSetImpl.getResources()
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.