Package org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.actions

# Class AbstractMergeRunnable

java.lang.Object
org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.actions.AbstractMergeRunnable

Direct Known Subclasses:
  `MergeConflictingRunnable`, `MergeContainedRunnable`, `MergeNonConflictingRunnable`, `MergeRunnableImpl`

public abstract class AbstractMergeRunnable extends Object
Provides inheritable default behavior for the merge runnables.

## Constructor Summary

Constructors
Constructor
Description
`AbstractMergeRunnable(boolean isLeftEditable, boolean isRightEditable, MergeMode mergeMode, IDiffRelationshipComputer diffRelationshipComputer)`
Default constructor.

## Method Summary

Modifier and Type
Method
Description
`protected IDiffRelationshipComputer`
`getDiffRelationshipComputer(IMerger.Registry mergerRegistry)`
Returns the diff relationship computer instance from the compare configuration with the given merger registry.
`protected MergeMode`
`getMergeMode()`
`protected boolean`
`isLeftEditable()`
`protected boolean`
`isRightEditable()`
`protected void`
`markAllAsMerged(Collection<? extends Diff> diffToMarkAsMerged, MergeMode mode, IMerger.Registry mergerRegistry)`
Marks all of the given diffs as merged, keeping track of the merged mode used for the operation.
`protected void`
`markAsMerged(Diff diff, MergeMode mode, boolean mergeRightToLeft, IMerger.Registry mergerRegistry)`
Marks a single diff as merged, keeping track of the merge mode used for the operation.
`protected void`
`mergeAll(Collection<? extends Diff> differences, boolean leftToRight, IMerger.Registry mergerRegistry)`

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

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

## Constructor Details

### AbstractMergeRunnable

public AbstractMergeRunnable(boolean isLeftEditable, boolean isRightEditable, MergeMode mergeMode, IDiffRelationshipComputer diffRelationshipComputer)
Default constructor.

Parameters:
  `isLeftEditable` - Whether the left side of the comparison we're operating on is editable.
  `isRightEditable` - Whether the right side of the comparison we're operating on is editable.
  `mergeMode` - Merge mode for this operation.
  `diffRelationshipComputer` - The diff relationship computer used to find resulting merges and rejections.

## Method Details

### isLeftEditable

protected boolean isLeftEditable()

### isRightEditable

protected boolean isRightEditable()

### getMergeMode

protected MergeMode getMergeMode()

### getDiffRelationshipComputer

protected IDiffRelationshipComputer getDiffRelationshipComputer(IMerger.Registry mergerRegistry)
Returns the diff relationship computer instance from the compare configuration with the given merger registry. If no computer instance has been set, a default instance will be created.

Parameters:
  `mergerRegistry` - merger registry used to compute diff relationships.
Returns:
  a non-null diff relationship computer.

### markAllAsMerged

protected void markAllAsMerged(Collection<? extends Diff> diffToMarkAsMerged, MergeMode mode, IMerger.Registry mergerRegistry)
Marks all of the given diffs as merged, keeping track of the merged mode used for the operation.

Parameters:
  `diffToMarkAsMerged` - List of Diffs that are to be marked as merged.
  `mode` - Mode with which these diffs have been merged.
  `mergerRegistry` - Current registry of mergers.

### markAsMerged

protected void markAsMerged(Diff diff, MergeMode mode, boolean mergeRightToLeft, IMerger.Registry mergerRegistry)
Marks a single diff as merged, keeping track of the merge mode used for the operation.

Parameters:
  `diff` - Diff to mark as merged.
  `mode` - Mode with which this Diff has been merged.
  `mergeRightToLeft` - Direction of the merge operation.
  `mergerRegistry` - Current registry of mergers.

### mergeAll

protected void mergeAll(Collection<? extends Diff> differences, boolean leftToRight, IMerger.Registry mergerRegistry)