Class ModelResolverRegistry
java.lang.Object
org.eclipse.emf.compare.ide.ui.internal.logical.resolver.registry.ModelResolverRegistry
This registry implements its own strategy to define the "best" resolver to use.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears out all registered resolvers from this registry.getBestResolverFor
(org.eclipse.core.resources.IStorage sourceStorage) Returns aIModelResolver
that handles the given IStorage.Returns a view of the descriptors registered in this registry.boolean
This can be used to check whether model resolution is currently enabled.
-
Constructor Details
-
ModelResolverRegistry
public ModelResolverRegistry()Initializes our registry.- Parameters:
preferenceStore
- Preference store this can query for resolver-related information.
-
-
Method Details
-
getRegisteredDescriptors
Returns a view of the descriptors registered in this registry.- Returns:
- A view of the descriptors registered in this registry.
-
getBestResolverFor
Returns aIModelResolver
that handles the given IStorage.This will iterate over all the registered resolvers, selecting the highest-ranking resolver that can resolve the target models.
- Parameters:
sourceStorage
- Source of the comparison- Returns:
- a
IModelResolver
that is able to handle the IStorage.
-
isEnabled
public boolean isEnabled()This can be used to check whether model resolution is currently enabled.- Returns:
true
if the model resolution is enabled,false
otherwise.
-
clear
public void clear()Clears out all registered resolvers from this registry.
-