org.eclipse.emf.compare.ide.ui.internal.logical.resolver.registry

## 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 and Description
`ModelResolverRegistry()` Initializes our registry.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clear()` Clears out all registered resolvers from this registry.
`IModelResolver` `getBestResolverFor(org.eclipse.core.resources.IStorage sourceStorage)` Returns a `IModelResolver` 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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ModelResolverRegistry

    public ModelResolverRegistry()

Initializes our registry.

Parameters:
  `preferenceStore` - Preference store this can query for resolver-related information.

### 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 a `IModelResolver` 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.