org.eclipse.emf.compare.ide.ui.internal.logical.view.registry

## 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 and Description
`LogicalModelViewHandlerRegistry()` Initializes our registry.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clear()` Clears out all registered handlers from this registry.
`ILogicalModelViewHandler` `getBestHandlerFor(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)` Returns a `ILogicalModelViewHandler` that handles the given ISelection.
`List<LogicalModelViewHandlerDescriptor>` `getRegisteredDescriptors()` Returns a view of the descriptors registered in this registry.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LogicalModelViewHandlerRegistry

    public LogicalModelViewHandlerRegistry()

Initializes our 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 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.