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 voidclear()Clears out all registered resolvers from this registry.IModelResolvergetBestResolverFor(org.eclipse.core.resources.IStorage sourceStorage)Returns aIModelResolverthat handles the given IStorage.List<ModelResolverDescriptor>getRegisteredDescriptors()Returns a view of the descriptors registered in this registry.booleanisEnabled()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 aIModelResolverthat 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
IModelResolverthat is able to handle the IStorage.
-
isEnabled
public boolean isEnabled()
This can be used to check whether model resolution is currently enabled.- Returns:
trueif the model resolution is enabled,falseotherwise.
-
clear
public void clear()
Clears out all registered resolvers from this registry.
-
-