Class EMFCompareTextMergeViewer.EditCommand
java.lang.Object
org.eclipse.emf.common.command.AbstractCommand
org.eclipse.emf.common.command.CompoundCommand
org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.text.EMFCompareTextMergeViewer.EditCommand
- All Implemented Interfaces:
Command
,ICompareCopyCommand
- Enclosing class:
- EMFCompareTextMergeViewer
public static class EMFCompareTextMergeViewer.EditCommand
extends CompoundCommand
implements ICompareCopyCommand
A compound command that updates the value of a feature associated with a diff and rejects the diff
itself.
-
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.common.command.CompoundCommand
commandList, LAST_COMMAND_ALL, MERGE_COMMAND_ALL, resultIndex
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
-
Constructor Summary
ConstructorDescriptionEditCommand
(Diff diff, IModelUpdateStrategy modelUpdateStrategy, IMergeViewer.MergeViewerSide side, String newValue) Creates a new compound command for the givenside
. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.Multimap<DifferenceState,
Diff> Returns the state changes to any diffs that this command produced.getDiff()
Returns the diff on which this command operates.Returns the update strategy used to make the change to the feature.getSide()
Returns the side on which this command operates.boolean
Returns true if the command will be applied from left to right side, false otherwise.protected boolean
prepare()
recreate()
Creates a new instance of this same command.Methods inherited from class org.eclipse.emf.common.command.CompoundCommand
append, appendAndExecute, appendIfCanExecute, canUndo, dispose, execute, getAffectedObjects, getCommandList, getDescription, getLabel, getMergedAffectedObjectsCollection, getMergedResultCollection, getResult, getResultIndex, isEmpty, redo, toString, undo, unwrap
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
canExecute, chain, setDescription, setLabel
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
canExecute, canUndo, chain, dispose, execute, getAffectedObjects, getDescription, getLabel, getResult, redo, undo
-
Constructor Details
-
EditCommand
public EditCommand(Diff diff, IModelUpdateStrategy modelUpdateStrategy, IMergeViewer.MergeViewerSide side, String newValue) Creates a new compound command for the givenside
.- Parameters:
side
- The side on which this command executes.
-
-
Method Details
-
isLeftToRight
public boolean isLeftToRight()Returns true if the command will be applied from left to right side, false otherwise.- Specified by:
isLeftToRight
in interfaceICompareCopyCommand
- Returns:
- true if the command will be applied from left to right side, false otherwise.
-
getSide
Returns the side on which this command operates.- Returns:
- the side on which this command operates.
-
getDiff
Returns the diff on which this command operates.- Returns:
- the diff on which this command operates.
-
getModelUpdateStrategy
Returns the update strategy used to make the change to the feature.- Returns:
-
getChangedDiffs
Returns the state changes to any diffs that this command produced.- Returns:
- the state changes to any diffs that this command produced.
-
recreate
Creates a new instance of this same command.- Returns:
- a new instance of this same command.
-
prepare
protected boolean prepare()- Overrides:
prepare
in classCompoundCommand
-