Class LogicalModelViewHandlerRegistry

java.lang.Object
org.eclipse.emf.compare.ide.ui.internal.logical.view.registry.LogicalModelViewHandlerRegistry

public final class LogicalModelViewHandlerRegistry extends Object
This registry implements its own strategy to define the "best" Logical Model Editors Handler to use.
  • Constructor Details

    • LogicalModelViewHandlerRegistry

      public LogicalModelViewHandlerRegistry()
      Initializes our registry.
  • Method Details

    • getRegisteredDescriptors

      public List<LogicalModelViewHandlerDescriptor> getRegisteredDescriptors()
      Returns a view of the descriptors registered in this registry.
      Returns:
      A view of the descriptors registered in this registry.
    • getBestHandlerFor

      public ILogicalModelViewHandler getBestHandlerFor(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)
      Returns a ILogicalModelViewHandler that handles the given ISelection.

      This will iterate over all the registered handlers, selecting the highest-ranking handler that can handle the target selection.

      Parameters:
      part - the IWorkbenchPart of the editor on which the selection occurs.
      selection - the selection.
      Returns:
      a ILogicalModelViewHandler that is able to handle the ISelection.
    • clear

      public void clear()
      Clears out all registered handlers from this registry.