Package org.eclipse.emf.compare.ide.hook
Interface IResourceSetHook
- All Known Implementing Classes:
AbstractResourceSetHooks
public interface IResourceSetHook
Interface used to hook some behavior into the
ResourceSet used by EMF Compare when using logical
model.- Since:
- 3.2
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisHookFor(Collection<? extends URI> uris) Returns true if this hook should be used.voidThis will be called when the resource set is disposed (if it is).voidpostLoadingHook(ResourceSet resourceSet, Collection<? extends URI> uris) This will be called after the resource set is populated in an unspecified order.voidpreLoadingHook(ResourceSet resourceSet, Collection<? extends URI> uris) This will be called before the final resource set is populated, in unspecified order.
-
Method Details
-
isHookFor
Returns true if this hook should be used.- Parameters:
uris- list ofURIs about to be loaded in theResourceSet.- Returns:
trueif this hook should be used,falseotherwise.
-
preLoadingHook
This will be called before the final resource set is populated, in unspecified order. Resource set hooks can load resource in this resource set and thus an individual hook is not guaranteed to be provided an empty resource set here.- Parameters:
resourceSet- about to be filled.uris-URIs that the resource set has been requested to load. TheCollectionofURIis not modifiable.
-
postLoadingHook
This will be called after the resource set is populated in an unspecified order.- Parameters:
resourceSet- that has been filled withResources.uris-URIs that the resource set has been requested to load.TheCollectionofURIis not modifiable.
-
onDispose
This will be called when the resource set is disposed (if it is).By default, EMF Compare will not unload any resource. Still some resources might need to be unloaded. This method could be a good way to do it. Hooks are called in unspecified order, so resources may already have been unloaded by other hooks when yours is called.
- Parameters:
resources- List ofResources currently in the resource set.- See Also:
-