org.eclipse.emf.compare.rcp.ui.internal.mergeviewer.impl

## Class AbstractStructuredMergeViewer

- java.lang.Object
- - org.eclipse.jface.viewers.Viewer
  - - org.eclipse.jface.viewers.ContentViewer
    - - org.eclipse.emf.compare.rcp.ui.internal.mergeviewer.impl.AbstractMergeViewer
      - - org.eclipse.emf.compare.rcp.ui.internal.mergeviewer.impl.AbstractStructuredMergeViewer

All Implemented Interfaces:
  IMergeViewer, org.eclipse.jface.viewers.IInputProvider, org.eclipse.jface.viewers.IInputSelectionProvider, org.eclipse.jface.viewers.ISelectionProvider

Direct Known Subclasses:
  AbstractTableOrTreeMergeViewer

    public abstract class AbstractStructuredMergeViewer
    extends AbstractMergeViewer

A specific `AbstractMergeViewer` for the EMF Compare Editor.

Since:
  4.0

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer

`IMergeViewer.MergeViewerSide`

### Field Summary

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

`WIDGET_DATA_KEY`

### Constructor Summary

Constructors
Constructor and Description
`AbstractStructuredMergeViewer(org.eclipse.swt.widgets.Composite parent, IMergeViewer.MergeViewerSide side, IEMFCompareConfiguration compareConfiguration)` Default constructor.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract org.eclipse.swt.widgets.Control` `createControl(org.eclipse.swt.widgets.Composite parent)` Creates the primary control associated with this viewer.
`org.eclipse.swt.widgets.Control` `getControl()` Returns the primary control associated with this viewer.
`org.eclipse.jface.viewers.ISelection` `getSelection()`
`protected abstract org.eclipse.jface.viewers.StructuredViewer` `getStructuredViewer()` Returns the wrapped `StructuredViewer`.
`protected void` `handleDispose(org.eclipse.swt.events.DisposeEvent event)`
`protected abstract void` `hookDispose()`
`void` `setContentProvider(org.eclipse.jface.viewers.IContentProvider contentProvider)`
`void` `setLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider labelProvider)`
`void` `setSelection(org.eclipse.jface.viewers.ISelection selection, boolean reveal)` Sets a new selection for this viewer and optionally makes it visible.

### Methods inherited from class org.eclipse.emf.compare.rcp.ui.internal.mergeviewer.impl.AbstractMergeViewer

`getCompareConfiguration, getDifferenceFilter, getDifferenceGroupProvider, getSide, handleDifferenceFilterChange, handleDifferenceGroupProviderChange`

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

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

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

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

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

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

### Methods inherited from interface org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer

`refresh, setInput`

### Methods inherited from interface org.eclipse.jface.viewers.IInputProvider

`getInput`

### Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider

`addSelectionChangedListener, removeSelectionChangedListener, setSelection`

### Constructor Detail

#### AbstractStructuredMergeViewer

    public AbstractStructuredMergeViewer(org.eclipse.swt.widgets.Composite parent,
                                         IMergeViewer.MergeViewerSide side,
                                         IEMFCompareConfiguration compareConfiguration)

Default constructor.

Parameters:
  `parent` - the parent widget.
  `side` - the side of the viewer.
  `compareConfiguration` - the compare configuration object used by this viewer.

### Method Detail

#### createControl

    protected abstract org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)

Creates the primary control associated with this viewer.

Parameters:
  `parent` - the parent widget of this viewer.
Returns:
  the created primary control associated with this viewer.

#### getStructuredViewer

    protected abstract org.eclipse.jface.viewers.StructuredViewer getStructuredViewer()

Returns the wrapped `StructuredViewer`.

Returns:
  the wrapped `StructuredViewer`.

#### getControl

    public org.eclipse.swt.widgets.Control getControl()

Returns the primary control associated with this viewer.

Specified by:
  `getControl` in interface `IMergeViewer`
Specified by:
  `getControl` in class `org.eclipse.jface.viewers.Viewer`
Returns:
  the SWT control which displays this viewer's content
See Also:
  `Viewer.getControl()`

#### handleDispose

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

Description copied from class: `AbstractMergeViewer`

Overrides:
  `handleDispose` in class `AbstractMergeViewer`
See Also:
  `ContentViewer.handleDispose(org.eclipse.swt.events.DisposeEvent)`

#### hookDispose

    protected abstract void hookDispose()

#### getSelection

    public org.eclipse.jface.viewers.ISelection getSelection()

Specified by:
  `getSelection` in interface `org.eclipse.jface.viewers.ISelectionProvider`
Specified by:
  `getSelection` in class `org.eclipse.jface.viewers.Viewer`
See Also:
  `ISelectionProvider.getSelection()`

#### setSelection

    public void setSelection(org.eclipse.jface.viewers.ISelection selection,
                             boolean reveal)

Sets a new selection for this viewer and optionally makes it visible.

Subclasses must implement this method.

Specified by:
  `setSelection` in interface `IMergeViewer`
Specified by:
  `setSelection` in class `org.eclipse.jface.viewers.Viewer`
Parameters:
  `selection` - the new selection
  `reveal` - `true` if the selection is to be made visible, and `false` otherwise
See Also:
  `Viewer.setSelection(org.eclipse.jface.viewers.ISelection, boolean)`

#### setContentProvider

    public void setContentProvider(org.eclipse.jface.viewers.IContentProvider contentProvider)

Overrides:
  `setContentProvider` in class `org.eclipse.jface.viewers.ContentViewer`

#### setLabelProvider

    public void setLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider labelProvider)

Overrides:
  `setLabelProvider` in class `org.eclipse.jface.viewers.ContentViewer`