Class LogicalModelViewHandlerRegistry
java.lang.Object
org.eclipse.emf.compare.ide.ui.internal.logical.view.registry.LogicalModelViewHandlerRegistry
This registry implements its own strategy to define the "best" Logical Model Editors Handler to use.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears out all registered handlers from this registry.getBestHandlerFor
(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection) Returns aILogicalModelViewHandler
that handles the given ISelection.Returns a view of the descriptors registered in this registry.
-
Constructor Details
-
LogicalModelViewHandlerRegistry
public LogicalModelViewHandlerRegistry()Initializes our registry.
-
-
Method Details
-
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 aILogicalModelViewHandler
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
- theIWorkbenchPart
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.
-