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 Details

    • ModelResolverRegistry

      public ModelResolverRegistry()
      Initializes our registry.
      Parameters:
      preferenceStore - Preference store this can query for resolver-related information.
  • Method Details

    • 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.