Class SetLabelsOffsetCommand
- java.lang.Object
-
- org.eclipse.core.commands.operations.AbstractOperation
-
- org.eclipse.emf.workspace.AbstractEMFOperation
-
- org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
-
- org.yakindu.base.xtext.utils.gmf.commands.SetLabelsOffsetCommand
-
- All Implemented Interfaces:
IUndoableOperation
,org.eclipse.gmf.runtime.common.core.command.ICommand
,org.eclipse.gmf.runtime.common.core.internal.command.ICommandWithSettableResult
public class SetLabelsOffsetCommand extends org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
This class allows to update edge label Node position.
-
-
Constructor Summary
Constructors Constructor Description SetLabelsOffsetCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.gmf.runtime.common.core.command.CommandResult
doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
void
setLabelsToUpdate(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connectionEditPart)
Set labels to update according to a connectionEditPart (all labels of this connection will be update).void
setLabelsToUpdate(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connectionEditPart, org.eclipse.draw2d.geometry.PointList originalPoints)
Set labels to update according to a connectionEditPart (all labels of this connection will be update).void
setNewPointList(org.eclipse.draw2d.geometry.PointList newPointList)
Method to set the newPointList.-
Methods inherited from class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
aggregateStatuses, cleanup, compose, didRedo, didUndo, doExecute, doRedo, doUndo, getAffectedFiles, getCommandResult, getWorkspaceFiles, getWorkspaceFiles, internalSetResult, reduce, setResult
-
Methods inherited from class org.eclipse.emf.workspace.AbstractEMFOperation
canRedo, canSetOptions, canUndo, didCommit, dispose, execute, getChange, getEditingDomain, getOptions, isReuseParentTransaction, redo, setOptions, setReuseParentTransaction, undo
-
Methods inherited from class org.eclipse.core.commands.operations.AbstractOperation
addContext, canExecute, getContexts, getLabel, hasContext, removeContext, 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.core.commands.operations.IUndoableOperation
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo
-
-
-
-
Method Detail
-
setNewPointList
public void setNewPointList(org.eclipse.draw2d.geometry.PointList newPointList)
Method to set the newPointList.- Parameters:
newPointList
- The new points list
-
doExecuteWithResult
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
- Specified by:
doExecuteWithResult
in classorg.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
- Throws:
ExecutionException
-
setLabelsToUpdate
public void setLabelsToUpdate(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connectionEditPart)
Set labels to update according to a connectionEditPart (all labels of this connection will be update).
This method must be called after having called thesetNewPointList(PointList)
method.- Parameters:
connectionEditPart
- The connection from which to get the potential three labels to update
-
setLabelsToUpdate
public void setLabelsToUpdate(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connectionEditPart, org.eclipse.draw2d.geometry.PointList originalPoints)
Set labels to update according to a connectionEditPart (all labels of this connection will be update). This method must be used if the edge figure is updated (through feedback) during the move. Indeed, in this case, we can not use the figure to retrieve the old points.
This method must be called after having called thesetNewPointList(PointList)
method.- Parameters:
connectionEditPart
- The connection from which to get the potential three labels to updateoriginalPoints
- The points of the edge before the move.
-
-