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

# Class EMFCompareTextMergeViewer

java.lang.Object
org.eclipse.jface.viewers.Viewer
org.eclipse.jface.viewers.ContentViewer
org.eclipse.compare.contentmergeviewer.ContentMergeViewer
org.eclipse.compare.contentmergeviewer.TextMergeViewer
org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.text.EMFCompareTextMergeViewer

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

public class EMFCompareTextMergeViewer extends org.eclipse.compare.contentmergeviewer.TextMergeViewer implements CommandStackListener

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`EMFCompareTextMergeViewer.EditCommand`
A compound command that updates the value of a feature associated with a diff and rejects the diff itself.

## Field Summary

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

`WIDGET_DATA_KEY`

## Constructor Summary

Constructors
Constructor
Description
`EMFCompareTextMergeViewer(org.eclipse.swt.widgets.Composite parent, EMFCompareConfiguration configuration)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`attachListeners(org.eclipse.compare.internal.MergeSourceViewer viewer, IMergeViewer.MergeViewerSide side)`
`void`
`commandStackChanged(EventObject event)`
`protected void`
`createControls(org.eclipse.swt.widgets.Composite composite)`
`protected void`
`createToolItems(org.eclipse.jface.action.ToolBarManager toolBarManager)`
`protected boolean`
`doSave(Object newInput, Object oldInput)`
Inhibits this method to avoid asking to save on each input change!!
`void`
`editingDomainChange(ICompareEditingDomain oldValue, ICompareEditingDomain newValue)`
`void`
`editingDomainChange(ICompareEditingDomainChange event)`
`protected void`
`endOfContentReached(boolean next)`
Called by the framework when the last (or first) diff of the current content viewer has been reached.
`protected void`
`flushContent(Object oldInput, org.eclipse.core.runtime.IProgressMonitor monitor)`
`protected final org.eclipse.compare.internal.MergeSourceViewer`
`getAncestorSourceViewer()`
`protected EMFCompareConfiguration`
`getCompareConfiguration()`
`protected String`
`getContents(boolean isLeft, String charsetName)`
`DynamicObject`
`getDynamicObject()`
`protected final org.eclipse.compare.internal.CompareHandlerService`
`getHandlerService()`
`protected final org.eclipse.compare.internal.MergeSourceViewer`
`getLeftSourceViewer()`
`protected ResourceBundle`
`getResourceBundle()`
`protected final org.eclipse.compare.internal.MergeSourceViewer`
`getRightSourceViewer()`
`protected void`
`handleDispose(org.eclipse.swt.events.DisposeEvent event)`
`protected void`
`handlePropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent event)`
`protected void`
`navigate(boolean next)`
Called by the framework to navigate to the next (or previous) difference.
`void`
`setContentProvider(org.eclipse.jface.viewers.IContentProvider contentProvider)`
`protected final void`
`setHandlerService(org.eclipse.compare.internal.CompareHandlerService service)`

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

`configureTextViewer, copy, createCenterControl, createIgnoreWhitespaceContributor, createSourceViewer, createTokenComparator, findInsertionPosition, getAdapter, getCenterWidth, getContents, getDocumentPartitioner, getDocumentPartitioning, getEditorInput, handleCompareInputChange, handleResizeAncestor, handleResizeLeftRight, handleSetFocus, invalidateTextPresentation, isEditorBacked, setActionsActivated, setBackgroundColor, setEditable, setForegroundColor, setupDocument, updateContent, updateHeader, updateToolItems`

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

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

### 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

### EMFCompareTextMergeViewer

public EMFCompareTextMergeViewer(org.eclipse.swt.widgets.Composite parent, EMFCompareConfiguration configuration)

Parameters:
  `parent` -
  `configuration` -

## Method Details

### setContentProvider

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

Overrides:
  `setContentProvider` in class `org.eclipse.compare.contentmergeviewer.ContentMergeViewer`

### editingDomainChange

public void editingDomainChange(ICompareEditingDomainChange event)

Parameters:
  `oldValue` -
  `newValue` -

### editingDomainChange

public void editingDomainChange(ICompareEditingDomain oldValue, ICompareEditingDomain newValue)

### commandStackChanged

public void commandStackChanged(EventObject event)

Specified by:
  `commandStackChanged` in interface `CommandStackListener`

### getCompareConfiguration

protected EMFCompareConfiguration getCompareConfiguration()

Overrides:
  `getCompareConfiguration` in class `org.eclipse.compare.contentmergeviewer.ContentMergeViewer`
See Also:
  - `ContentMergeViewer.getCompareConfiguration()`

### doSave

protected boolean doSave(Object newInput, Object oldInput)
Inhibits this method to avoid asking to save on each input change!!

Overrides:
  `doSave` in class `org.eclipse.compare.contentmergeviewer.TextMergeViewer`
See Also:
  - `ContentMergeViewer.doSave(java.lang.Object, java.lang.Object)`

### getContents

protected String getContents(boolean isLeft, String charsetName)

### getDynamicObject

public DynamicObject getDynamicObject()

Returns:
  the fDynamicObject

### getAncestorSourceViewer

protected final org.eclipse.compare.internal.MergeSourceViewer getAncestorSourceViewer()

### getLeftSourceViewer

protected final org.eclipse.compare.internal.MergeSourceViewer getLeftSourceViewer()

### getRightSourceViewer

protected final org.eclipse.compare.internal.MergeSourceViewer getRightSourceViewer()

### getHandlerService

protected final org.eclipse.compare.internal.CompareHandlerService getHandlerService()

### setHandlerService

protected final void setHandlerService(org.eclipse.compare.internal.CompareHandlerService service)

### createControls

protected void createControls(org.eclipse.swt.widgets.Composite composite)

Overrides:
  `createControls` in class `org.eclipse.compare.contentmergeviewer.TextMergeViewer`
See Also:
  - `TextMergeViewer.createControls(org.eclipse.swt.widgets.Composite)`

### attachListeners

protected void attachListeners(org.eclipse.compare.internal.MergeSourceViewer viewer, IMergeViewer.MergeViewerSide side)

### createToolItems

protected void createToolItems(org.eclipse.jface.action.ToolBarManager toolBarManager)

Overrides:
  `createToolItems` in class `org.eclipse.compare.contentmergeviewer.TextMergeViewer`
See Also:
  - `TextMergeViewer.createToolItems(org.eclipse.jface.action.ToolBarManager)`

### endOfContentReached

protected void endOfContentReached(boolean next)
Called by the framework when the last (or first) diff of the current content viewer has been reached. This will open the content viewer for the next (or previous) diff displayed in the structure viewer.

Parameters:
  `next` - `true` if we are to open the next structure viewer's diff, `false` if we should go to the previous instead.

### navigate

protected void navigate(boolean next)
Called by the framework to navigate to the next (or previous) difference. This will open the content viewer for the next (or previous) diff displayed in the structure viewer.

Parameters:
  `next` - `true` if we are to open the next structure viewer's diff, `false` if we should go to the previous instead.

### getResourceBundle

protected ResourceBundle getResourceBundle()

Overrides:
  `getResourceBundle` in class `org.eclipse.compare.contentmergeviewer.ContentMergeViewer`

### handleDispose

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

Overrides:
  `handleDispose` in class `org.eclipse.compare.contentmergeviewer.TextMergeViewer`
See Also:
  - `TextMergeViewer.handleDispose(org.eclipse.swt.events.DisposeEvent)`

### handlePropertyChangeEvent

protected void handlePropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent event)

Overrides:
  `handlePropertyChangeEvent` in class `org.eclipse.compare.contentmergeviewer.TextMergeViewer`

### flushContent

protected void flushContent(Object oldInput, org.eclipse.core.runtime.IProgressMonitor monitor)

Overrides:
  `flushContent` in class `org.eclipse.compare.contentmergeviewer.TextMergeViewer`