Class ModelResolverRegistry
- java.lang.Object
-
- org.eclipse.emf.compare.ide.ui.internal.logical.resolver.registry.ModelResolverRegistry
-
public final class ModelResolverRegistry extends Object
This registry implements its own strategy to define the "best" resolver to use.
-
-
Constructor Summary
Constructors Constructor Description ModelResolverRegistry()
Initializes our registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears out all registered resolvers from this registry.IModelResolver
getBestResolverFor(org.eclipse.core.resources.IStorage sourceStorage)
Returns aIModelResolver
that handles the given IStorage.List<ModelResolverDescriptor>
getRegisteredDescriptors()
Returns a view of the descriptors registered in this registry.boolean
isEnabled()
This can be used to check whether model resolution is currently enabled.
-
-
-
Method Detail
-
getRegisteredDescriptors
public List<ModelResolverDescriptor> getRegisteredDescriptors()
Returns a view of the descriptors registered in this registry.- Returns:
- A view of the descriptors registered in this registry.
-
getBestResolverFor
public IModelResolver getBestResolverFor(org.eclipse.core.resources.IStorage sourceStorage)
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.
-
-