Class AdjustIdentityAnchorCommand

  • All Implemented Interfaces:
    IUndoableOperation, org.eclipse.gmf.runtime.common.core.command.ICommand, org.eclipse.gmf.runtime.common.core.internal.command.ICommandWithSettableResult

    public class AdjustIdentityAnchorCommand
    extends org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
    Recalculates the IdentityAnchors to recalculate connection anchors when a node is resized Parts are copied from Sirius ShiftEdgeIdentityAnchorOperation
    • Constructor Detail

      • AdjustIdentityAnchorCommand

        public AdjustIdentityAnchorCommand​(org.eclipse.emf.transaction.TransactionalEditingDomain domain,
                                           org.eclipse.gef.requests.ChangeBoundsRequest request)
    • Method Detail

      • doExecuteWithResult

        protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult​(IProgressMonitor monitor,
                                                                                                IAdaptable info)
                                                                                         throws ExecutionException
        Specified by:
        doExecuteWithResult in class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
        Throws:
        ExecutionException
      • adjustAnchors

        protected void adjustAnchors​(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart)
      • getScale

        protected double getScale​(org.eclipse.gef.EditPart part)
      • getAnchorRelativePoint

        protected org.eclipse.draw2d.geometry.Point getAnchorRelativePoint​(org.eclipse.draw2d.geometry.PrecisionPoint currentAnchorPoint,
                                                                           org.eclipse.draw2d.geometry.Rectangle bounds)
      • computeNewYRelativeLocation

        protected double computeNewYRelativeLocation​(int direction,
                                                     org.eclipse.draw2d.geometry.Point currentRelativePoint,
                                                     double logicalHeightDelta)
      • composeTerminalString

        protected String composeTerminalString​(org.eclipse.draw2d.geometry.PrecisionPoint p)