org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.provider

## Class CompareAccessorMergeViewerItemProvider

- java.lang.Object
- - org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.provider.CompareAccessorMergeViewerItemProvider

All Implemented Interfaces:
  IMergeViewerItemProvider, IOptionalProvider

    public class CompareAccessorMergeViewerItemProvider
    extends Object
    implements IMergeViewerItemProvider

Implementation of `IMergeViewerItemProvider` which extracts the `IMergeViewerItem`s from `ICompareAccessor`s.

Since:
  4.3

### Constructor Summary

Constructors
Constructor and Description
`CompareAccessorMergeViewerItemProvider()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `canHandle(Object object)` Indicates whether this provider wants to handle the given `object`.
`IMergeViewerItem` `getItemToSelect(Object object, IMergeViewerItemProviderConfiguration configuration)` Determine the merge viewer item which shall be selected.
`List<Object>` `getMergeViewerItems(Object object, IMergeViewerItemProviderConfiguration configuration)` Determine the root merge viewer items for the given `object`.

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

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

### Constructor Detail

#### CompareAccessorMergeViewerItemProvider

    public CompareAccessorMergeViewerItemProvider()

### Method Detail

#### getMergeViewerItems

    public List<Object> getMergeViewerItems(Object object,
                                            IMergeViewerItemProviderConfiguration configuration)

Determine the root merge viewer items for the given `object`.

Specified by:
  `getMergeViewerItems` in interface `IMergeViewerItemProvider`
Parameters:
  `object` - the `Object` for which the root merge viewer items are to be determined.
  `configuration` - the `IMergeViewerItemProviderConfiguration`.
Returns:
  a list of the root elements.

#### getItemToSelect

    public IMergeViewerItem getItemToSelect(Object object,
                                            IMergeViewerItemProviderConfiguration configuration)

Determine the merge viewer item which shall be selected.

Specified by:
  `getItemToSelect` in interface `IMergeViewerItemProvider`
Parameters:
  `object` - the `Object` for which the selected merge viewer item is to be determined.
  `configuration` - the `IMergeViewerItemProviderConfiguration`.
Returns:
  the merge viewer item to select.

#### canHandle

    public boolean canHandle(Object object)

Indicates whether this provider wants to handle the given `object`.

Specified by:
  `canHandle` in interface `IOptionalProvider`
Parameters:
  `object` - the `Object`.
Returns:
  `true` if the provider wants to handle the given `object`, `false` otherwise.