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

# Class DelegatingTreeMergeViewerItemContentProvider

java.lang.Object
org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider
org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.provider.DelegatingTreeMergeViewerItemContentProvider

All Implemented Interfaces:
  `INotifyChangedListener`, `org.eclipse.jface.viewers.IContentProvider`, `org.eclipse.jface.viewers.IStructuredContentProvider`, `org.eclipse.jface.viewers.ITreeContentProvider`, `org.eclipse.ui.views.properties.IPropertySourceProvider`

public class DelegatingTreeMergeViewerItemContentProvider extends AdapterFactoryContentProvider
This implementation of `ITreeContentProvider` delegates to the `IMergeViewerItemProvider`s and `IMergeViewerItemContentProvider`s registered via the content merge viewer customization extension point. If no fitting provider is registered, the calls will be delegated to the AdapterFactory.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider

`AdapterFactoryContentProvider.ViewerRefresh`

## Field Summary

### Fields inherited from class org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider

`adapterFactory, viewer, viewerRefresh`

## Constructor Summary

Constructors
Constructor
Description
`DelegatingTreeMergeViewerItemContentProvider(Comparison comparison, IMergeViewerItemProviderConfiguration configuration)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Object[]`
`getChildren(Object object)`
`protected Comparison`
`getComparison()`
Get the `Comparison`.
`protected IMergeViewerItemProviderConfiguration`
`getConfiguration()`
Get the `IMergeViewerItemProviderConfiguration`.
`protected IMergeViewerItemContentProvider`
`getContentProvider(Object object)`
Determines the `IMergeViewerItemContentProvider` for the given `Object`.
`Object[]`
`getElements(Object object)`
`protected IMergeViewerItemProvider`
`getMergeViewerItemProvider(Object object)`
Determines the `IMergeViewerItemProvider` for the given `Object`.
`Object`
`getParent(Object object)`
`boolean`
`hasChildren(Object object)`

### Methods inherited from class org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider

`createPropertySource, dispose, getAdapterFactory, getPropertySource, getViewerRefreshDelay, getViewerRefreshTheshold, inputChanged, notifyChanged, setAdapterFactory`

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

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

## Constructor Details

### DelegatingTreeMergeViewerItemContentProvider

public DelegatingTreeMergeViewerItemContentProvider(Comparison comparison, IMergeViewerItemProviderConfiguration configuration)
Constructor.

Parameters:
  `comparison` - the `Comparison`.
  `configuration` - the `IMergeViewerItemProviderConfiguration`.

## Method Details

### getConfiguration

protected IMergeViewerItemProviderConfiguration getConfiguration()
Get the `IMergeViewerItemProviderConfiguration`.

Returns:
  the `IMergeViewerItemProviderConfiguration`.

### getComparison

protected Comparison getComparison()
Get the `Comparison`.

Returns:
  the `Comparison`.

### getElements

public Object[] getElements(Object object)

Specified by:
  `getElements` in interface `org.eclipse.jface.viewers.IStructuredContentProvider`
Specified by:
  `getElements` in interface `org.eclipse.jface.viewers.ITreeContentProvider`
Overrides:
  `getElements` in class `AdapterFactoryContentProvider`

### hasChildren

public boolean hasChildren(Object object)

Specified by:
  `hasChildren` in interface `org.eclipse.jface.viewers.ITreeContentProvider`
Overrides:
  `hasChildren` in class `AdapterFactoryContentProvider`

### getChildren

public Object[] getChildren(Object object)

Specified by:
  `getChildren` in interface `org.eclipse.jface.viewers.ITreeContentProvider`
Overrides:
  `getChildren` in class `AdapterFactoryContentProvider`

### getParent

public Object getParent(Object object)

Specified by:
  `getParent` in interface `org.eclipse.jface.viewers.ITreeContentProvider`
Overrides:
  `getParent` in class `AdapterFactoryContentProvider`

### getMergeViewerItemProvider

protected IMergeViewerItemProvider getMergeViewerItemProvider(Object object)
Determines the `IMergeViewerItemProvider` for the given `Object`.

Parameters:
  `object` - the `Object` for which an `IMergeViewerItemProvider` is to be determined.
Returns:
  the determined `IMergeViewerItemProvider`.

### getContentProvider

protected IMergeViewerItemContentProvider getContentProvider(Object object)
Determines the `IMergeViewerItemContentProvider` for the given `Object`.

Parameters:
  `object` - the `Object` for which an `IMergeViewerItemContentProvider` is to be determined.
Returns:
  the determined `IMergeViewerItemContentProvider`.