public final class LogicalModelViewHandlerRegistry extends Object
Constructor and Description |
---|
LogicalModelViewHandlerRegistry()
Initializes our registry.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears out all registered handlers from this registry.
|
ILogicalModelViewHandler |
getBestHandlerFor(IWorkbenchPart part)
Returns a
ILogicalModelViewHandler that handles the given IWorkbenchPart. |
ILogicalModelViewHandler |
getBestHandlerFor(IWorkbenchPart part,
ISelection selection)
Returns a
ILogicalModelViewHandler that handles the given ISelection. |
List<LogicalModelViewHandlerDescriptor> |
getRegisteredDescriptors()
Returns a view of the descriptors registered in this registry.
|
public LogicalModelViewHandlerRegistry()
public List<LogicalModelViewHandlerDescriptor> getRegisteredDescriptors()
public ILogicalModelViewHandler getBestHandlerFor(IWorkbenchPart part)
ILogicalModelViewHandler
that handles the given IWorkbenchPart.
This will iterate over all the registered handlers, selecting the highest-ranking handler that can handle the target workbench part.
part
- the workbench part of the editor.ILogicalModelViewHandler
that is able to handle the IWorkbenchPart.public ILogicalModelViewHandler getBestHandlerFor(IWorkbenchPart part, ISelection selection)
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.
part
- the IWorkbenchPart
of the editor on which the selection occurs.selection
- the selection.ILogicalModelViewHandler
that is able to handle the ISelection.public void clear()
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.