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

## Class MergeNonConflictingRunnable

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

All Implemented Interfaces:
  IMergeRunnable, IMergeAllNonConflictingRunnable

    public class MergeNonConflictingRunnable
    extends AbstractMergeRunnable
    implements IMergeAllNonConflictingRunnable, IMergeRunnable

Implements the "merge non-conflicting" and "merge all non-conflicting" action.

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `doMergeDiffWithConflicts(boolean leftToRight, IMerger.Registry mergerRegistry, List<Diff> affectedDiffs, Monitor emfMonitor, Diff diff)`
`Iterable<Diff>` `merge(Comparison comparison, boolean leftToRight, IMerger.Registry mergerRegistry)` Merges all non-conflicting differences from the given comparison in either direction.
`void` `merge(List<? extends Diff> differences, boolean leftToRight, IMerger.Registry mergerRegistry)` Execute the merge operation.

### Methods inherited from class org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.actions.AbstractMergeRunnable

`getDiffRelationshipComputer, getMergeMode, isLeftEditable, isRightEditable, markAllAsMerged, markAsMerged`

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

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

### Constructor Detail

#### MergeNonConflictingRunnable

    public MergeNonConflictingRunnable(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 Detail

#### merge

    public Iterable<Diff> merge(Comparison comparison,
                                boolean leftToRight,
                                IMerger.Registry mergerRegistry)

Merges all non-conflicting differences from the given comparison in either direction.

Specified by:
  `merge` in interface `IMergeAllNonConflictingRunnable`
Parameters:
  `comparison` - The comparison which differences we are to merge.
  `leftToRight` - Direction of the merge operation.
  `mergerRegistry` - The registry to query for the appropriate merger for each difference.
Returns:
  an iterable over the differences that have actually been merged by this operation.

#### merge

    public void merge(List<? extends Diff> differences,
                      boolean leftToRight,
                      IMerger.Registry mergerRegistry)

Execute the merge operation.

Differences that are conflicting or that depend on conflicting differences will be left out. Non-conflicting differences that are implied or required by the given differences will be merged, also if they are not explicitly included in the given list of `differences`.

Specified by:
  `merge` in interface `IMergeRunnable`
Parameters:
  `differences` - the differences to merge.
  `leftToRight` - whether the differences have to be merge from left to right or right to left.
  `mergerRegistry` - the merger registry to query to get the appropriate mergers for each difference to be merged.

#### doMergeDiffWithConflicts

    protected void doMergeDiffWithConflicts(boolean leftToRight,
                                            IMerger.Registry mergerRegistry,
                                            List<Diff> affectedDiffs,
                                            Monitor emfMonitor,
                                            Diff diff)