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

## Class AbstractTreeContentMergeViewer

- 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

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`

Direct Known Subclasses:
  `TreeContentMergeViewer`

    public abstract class AbstractTreeContentMergeViewer
    extends EMFCompareContentMergeViewer

Specialized `ContentMergeViewer` that uses `TreeViewer` to display left, right and ancestor `EObject`.

### 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
`AbstractTreeContentMergeViewer​(int style, ResourceBundle bundle, EMFCompareConfiguration config)` Creates a new `AbstractTreeContentMergeViewer` by calling the super constructor with the given parameters.

### Method Summary

All Methods Instance Methods Concrete Methods
`TreeMergeViewer` `getAncestorMergeViewer()`
`protected byte[]` `getContents​(boolean left)`
`TreeMergeViewer` `getLeftMergeViewer()`
`TreeMergeViewer` `getRightMergeViewer()`
`protected void` `hookListeners​(TreeMergeViewer treeMergeViewer)` Adds all required listeners to the given `TreeMergeViewer`.
`protected void` `paintCenter​(org.eclipse.swt.graphics.GC g)`

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

`colorChanged, commandStackChanged, copy, createCenterControl, createControls, createMergeViewer, createToolItems, doSave, editingDomainChange, flushContent, getAdapter, getCenterWidth, getCompareColor, getCompareConfiguration, getControl, getDifferenceFilterPredicate, getDifferenceGroupProvider, getDiffFrom, getEffectiveSide, getHandlerService, handleAdapterFactoryChange, handleDifferenceFiltersChange, handleDifferenceGroupProviderChange, handleDispose, 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 Detail

#### AbstractTreeContentMergeViewer

    public AbstractTreeContentMergeViewer​(int style,
                                          ResourceBundle bundle,
                                          EMFCompareConfiguration config)

Creates a new `AbstractTreeContentMergeViewer` 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`

### Method Detail

#### getAncestorMergeViewer

    public TreeMergeViewer getAncestorMergeViewer()

Overrides:
  `getAncestorMergeViewer` in class `EMFCompareContentMergeViewer`
Returns:
  the fAncestor
See Also:
  `EMFCompareContentMergeViewer.getAncestorMergeViewer()`

#### getLeftMergeViewer

    public TreeMergeViewer getLeftMergeViewer()

Overrides:
  `getLeftMergeViewer` in class `EMFCompareContentMergeViewer`
Returns:
  the fLeft
See Also:
  `EMFCompareContentMergeViewer.getLeftMergeViewer()`

#### getRightMergeViewer

    public TreeMergeViewer getRightMergeViewer()

Overrides:
  `getRightMergeViewer` in class `EMFCompareContentMergeViewer`
Returns:
  the fRight
See Also:
  `EMFCompareContentMergeViewer.getRightMergeViewer()`

#### getContents

    protected byte[] getContents​(boolean left)

Specified by:
  `getContents` in class `org.eclipse.compare.contentmergeviewer.ContentMergeViewer`
See Also:
  `ContentMergeViewer.getContents(boolean)`

#### hookListeners

    protected void hookListeners​(TreeMergeViewer treeMergeViewer)

Adds all required listeners to the given `TreeMergeViewer`.

Parameters:
  `treeMergeViewer` - the `TreeMergeViewer`.

#### paintCenter

    protected void paintCenter​(org.eclipse.swt.graphics.GC g)

Specified by:
  `paintCenter` in class `EMFCompareContentMergeViewer`
See Also:
  `org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#paintCenter(org.eclipse.swt.widgets.Canvas, org.eclipse.swt.graphics.GC)`