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

# Class TreeContentMergeViewer

java.lang.Object
org.eclipse.jface.viewers.Viewer
org.eclipse.jface.viewers.ContentViewer
org.eclipse.compare.contentmergeviewer.ContentMergeViewer
org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer
org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.AbstractTreeContentMergeViewer
org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.TreeContentMergeViewer

All Implemented Interfaces:
  `org.eclipse.compare.contentmergeviewer.IFlushable`, `org.eclipse.compare.internal.IFlushable2`, `org.eclipse.compare.IPropertyChangeNotifier`, `org.eclipse.core.runtime.IAdaptable`, `CommandStackListener`, `ICompareColor.Provider`, `org.eclipse.jface.viewers.IInputProvider`, `org.eclipse.jface.viewers.IInputSelectionProvider`, `org.eclipse.jface.viewers.ISelectionChangedListener`, `org.eclipse.jface.viewers.ISelectionProvider`

public class TreeContentMergeViewer extends AbstractTreeContentMergeViewer
Specialized `ContentMergeViewer` that uses `TreeViewer` to display left, right and ancestor `EObject`.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected final class`
`TreeContentMergeViewer.ExpandCollapseListener`

## Field Summary

### Fields inherited from class org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer

`CENTER_WIDTH`

### Fields inherited from class org.eclipse.jface.viewers.Viewer

`WIDGET_DATA_KEY`

## Constructor Summary

Constructors
Constructor
Description
`TreeContentMergeViewer(int style, ResourceBundle bundle, org.eclipse.swt.widgets.Composite parent, EMFCompareConfiguration config)`
Creates a new `TreeContentMergeViewer` by calling the super constructor with the given parameters.
`TreeContentMergeViewer(org.eclipse.swt.widgets.Composite parent, EMFCompareConfiguration config)`
Creates a new `TreeContentMergeViewer` by calling the super constructor with the given parameters.

## Method Summary

Modifier and Type
Method
Description
`protected AbstractMergeViewer`
`createMergeViewer(org.eclipse.swt.widgets.Composite parent, IMergeViewer.MergeViewerSide side)`
Creates the merge viewer for the given parent and the given side.
`protected org.eclipse.jface.viewers.IContentProvider`
`createMergeViewerContentProvider(IMergeViewer.MergeViewerSide side)`
Creates the `IContentProvider` used in the merge viewer.
`protected IMergeViewerItemProviderConfiguration`
`createMergeViewerItemProviderConfiguration(IMergeViewer.MergeViewerSide side)`
`protected ComposedAdapterFactory`
`getAdapterFactory()`
`protected void`
`handleDispose(org.eclipse.swt.events.DisposeEvent event)`
`protected void`
`hookListeners(TreeMergeViewer treeMergeViewer)`
Adds all required listeners to the given `TreeMergeViewer`.

### Methods inherited from class org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.AbstractTreeContentMergeViewer

`getAncestorMergeViewer, getContents, getLeftMergeViewer, getRightMergeViewer, paintCenter`

### Methods inherited from class org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer

`colorChanged, commandStackChanged, copy, createCenterControl, createControls, createToolItems, doSave, editingDomainChange, flushContent, getAdapter, getCenterWidth, getCompareColor, getCompareConfiguration, getControl, getDifferenceFilterPredicate, getDifferenceGroupProvider, getDiffFrom, getEffectiveSide, getHandlerService, handleAdapterFactoryChange, handleDifferenceFiltersChange, handleDifferenceGroupProviderChange, handleEditingDomainChange, handleMirroredChanged, handlePropertyChangeEvent, handleResizeAncestor, handleResizeLeftRight, redrawCenterControl, selectionChanged, setContentProvider, updateContent`

### Methods inherited from class org.eclipse.compare.contentmergeviewer.ContentMergeViewer

`addPropertyChangeListener, buildControl, flush, flushLeft, flushRight, getCenterControl, getResourceBundle, getSelection, getTitle, getToolBarManager, handleCompareInputChange, handleSetFocus, hookControl, inputChanged, internalIsLeftDirty, internalIsRightDirty, isAncestorVisible, isLeftDirty, isLeftEditable, isRightDirty, isRightEditable, isThreeWay, refresh, removePropertyChangeListener, save, setConfirmSave, setLeftDirty, setRightDirty, setSelection, updateHeader, updateToolItems`

### Methods inherited from class org.eclipse.jface.viewers.ContentViewer

`getContentProvider, getInput, getLabelProvider, handleLabelProviderChanged, labelProviderChanged, setInput, setLabelProvider`

### Methods inherited from class org.eclipse.jface.viewers.Viewer

`addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelection`

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

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

## Constructor Details

### TreeContentMergeViewer

public TreeContentMergeViewer(int style, ResourceBundle bundle, org.eclipse.swt.widgets.Composite parent, EMFCompareConfiguration config)
Creates a new `TreeContentMergeViewer` by calling the super constructor with the given parameters.

It calls `ContentMergeViewer.buildControl(Composite)` as stated in its javadoc.

It sets a `specific` `content provider` to properly display ancestor, left and right parts.

Parameters:
  `style` - the style indicator for the parent
  `bundle` - the `ResourceBundle` for localization
  `parent` - the parent composite to build the UI in
  `config` - the `CompareConfiguration`

### TreeContentMergeViewer

public TreeContentMergeViewer(org.eclipse.swt.widgets.Composite parent, EMFCompareConfiguration config)
Creates a new `TreeContentMergeViewer` by calling the super constructor with the given parameters.

It calls `ContentMergeViewer.buildControl(Composite)` as stated in its javadoc.

It sets a `specific` `content provider` to properly display ancestor, left and right parts.

Parameters:
  `parent` - the parent composite to build the UI in
  `config` - the `CompareConfiguration`

## Method Details

### getAdapterFactory

protected ComposedAdapterFactory getAdapterFactory()

### handleDispose

protected void handleDispose(org.eclipse.swt.events.DisposeEvent event)

Overrides:
  `handleDispose` in class `EMFCompareContentMergeViewer`
See Also:
  - `ContentMergeViewer.handleDispose(org.eclipse.swt.events.DisposeEvent)`

### createMergeViewer

protected AbstractMergeViewer createMergeViewer(org.eclipse.swt.widgets.Composite parent, IMergeViewer.MergeViewerSide side)
Creates the merge viewer for the given parent and the given side.

Specified by:
  `createMergeViewer` in class `EMFCompareContentMergeViewer`
Parameters:
  `parent` - composite in which to create the merge viewer.
  `side` - the side of the new viewer.
Returns:
  a new merge viewer.
See Also:
  - invalid reference

        org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#createMergeViewer(org.eclipse.swt.widgets.Composite)

### createMergeViewerContentProvider

protected org.eclipse.jface.viewers.IContentProvider createMergeViewerContentProvider(IMergeViewer.MergeViewerSide side)
Creates the `IContentProvider` used in the merge viewer.

Returns:
  the `IContentProvider` used in the merge viewer.

### createMergeViewerItemProviderConfiguration

protected IMergeViewerItemProviderConfiguration createMergeViewerItemProviderConfiguration(IMergeViewer.MergeViewerSide side)

### hookListeners

protected void hookListeners(TreeMergeViewer treeMergeViewer)
Adds all required listeners to the given `TreeMergeViewer`.

Overrides:
  `hookListeners` in class `AbstractTreeContentMergeViewer`
Parameters:
  `treeMergeViewer` - the `TreeMergeViewer`.