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 Summary
Constructors Constructor Description LogicalModelViewHandlerRegistry()Initializes our registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears out all registered handlers from this registry.ILogicalModelViewHandlergetBestHandlerFor(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)Returns aILogicalModelViewHandlerthat handles the given ISelection.List<LogicalModelViewHandlerDescriptor>getRegisteredDescriptors()Returns a view of the descriptors registered in this registry.
-
-
-
Method Detail
-
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 aILogicalModelViewHandlerthat 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- theIWorkbenchPartof the editor on which the selection occurs.selection- the selection.- Returns:
- a
ILogicalModelViewHandlerthat is able to handle the ISelection.
-
clear
public void clear()
Clears out all registered handlers from this registry.
-
-