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
Constructors Constructor Description EditCommand(Diff diff, IModelUpdateStrategy modelUpdateStrategy, IMergeViewer.MergeViewerSide side, String newValue)Creates a new compound command for the givenside.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.Multimap<DifferenceState,Diff>getChangedDiffs()Returns the state changes to any diffs that this command produced.DiffgetDiff()Returns the diff on which this command operates.IModelUpdateStrategygetModelUpdateStrategy()Returns the update strategy used to make the change to the feature.IMergeViewer.MergeViewerSidegetSide()Returns the side on which this command operates.booleanisLeftToRight()Returns true if the command will be applied from left to right side, false otherwise.protected booleanprepare()EMFCompareTextMergeViewer.EditCommandrecreate()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 Detail
-
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 Detail
-
isLeftToRight
public boolean isLeftToRight()
Returns true if the command will be applied from left to right side, false otherwise.- Specified by:
isLeftToRightin interfaceICompareCopyCommand- Returns:
- true if the command will be applied from left to right side, false otherwise.
-
getSide
public IMergeViewer.MergeViewerSide getSide()
Returns the side on which this command operates.- Returns:
- the side on which this command operates.
-
getDiff
public Diff getDiff()
Returns the diff on which this command operates.- Returns:
- the diff on which this command operates.
-
getModelUpdateStrategy
public IModelUpdateStrategy getModelUpdateStrategy()
Returns the update strategy used to make the change to the feature.- Returns:
-
getChangedDiffs
public com.google.common.collect.Multimap<DifferenceState,Diff> getChangedDiffs()
Returns the state changes to any diffs that this command produced.- Returns:
- the state changes to any diffs that this command produced.
-
recreate
public EMFCompareTextMergeViewer.EditCommand recreate()
Creates a new instance of this same command.- Returns:
- a new instance of this same command.
-
prepare
protected boolean prepare()
- Overrides:
preparein classCompoundCommand
-
-