org.eclipse.emf.compare.command.impl

## Class MergeCommand

- java.lang.Object
- - org.eclipse.emf.common.command.AbstractCommand
  - - org.eclipse.emf.edit.command.ChangeCommand
    - - org.eclipse.emf.compare.command.impl.AbstractCopyCommand
      - - org.eclipse.emf.compare.command.impl.MergeCommand

All Implemented Interfaces:
  Command, ICompareCopyCommand

    public class MergeCommand
    extends AbstractCopyCommand

A merge command that delegates it `doExecute()` to the `IMergeRunnable.merge(List, boolean, IMerger.Registry)` method.

Since:
  4.0

### Nested Class Summary

### Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand

`AbstractCommand.NonDirtying`

### Field Summary

### Fields inherited from class org.eclipse.emf.compare.command.impl.AbstractCopyCommand

`differences, leftToRight, mergerRegistry`

### Fields inherited from class org.eclipse.emf.edit.command.ChangeCommand

`changeDescription, changeRecorder, notifier, notifiers`

### Fields inherited from class org.eclipse.emf.common.command.AbstractCommand

`description, isExecutable, isPrepared, label`

### Constructor Summary

Constructors
Constructor and Description
`MergeCommand(ChangeRecorder changeRecorder, Collection<Notifier> notifiers, List<? extends Diff> differences, boolean leftToRight, IMerger.Registry mergerRegistry, IMergeRunnable runnable)` Creates a new instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `doExecute()`

### Methods inherited from class org.eclipse.emf.compare.command.impl.AbstractCopyCommand

`canExecute, getAffectedObjects, isLeftToRight`

### Methods inherited from class org.eclipse.emf.edit.command.ChangeCommand

`createChangeRecorder, dispose, disposeChangeRecorder, execute, getChangeDescription, getChangeRecorder, prepare, redo, setChangeDescription, undo`

### Methods inherited from class org.eclipse.emf.common.command.AbstractCommand

`canUndo, chain, getDescription, getLabel, getResult, setDescription, setLabel, toString`

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

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

### Methods inherited from interface org.eclipse.emf.common.command.Command

`canUndo, chain, dispose, execute, getDescription, getLabel, getResult, redo, undo`

### Constructor Detail

#### MergeCommand

    public MergeCommand(ChangeRecorder changeRecorder,
                        Collection<Notifier> notifiers,
                        List<? extends Diff> differences,
                        boolean leftToRight,
                        IMerger.Registry mergerRegistry,
                        IMergeRunnable runnable)

Creates a new instance.

Parameters:
  `changeRecorder` - The change recorder associated to this command.
  `notifiers` - The collection of notifiers that will be notified of this command's execution.
  `differences` - The list of differences that this command should merge.
  `leftToRight` - The direction in which `differences` should be merged.
  `mergerRegistry` - The registry of mergers.
  `runnable` - The merge runnable to delegate to.

### Method Detail

#### doExecute

    protected void doExecute()

Specified by:
  `doExecute` in class `ChangeCommand`
See Also:
  `ChangeCommand.doExecute()`