protected List<?> createSelectionHandles() { final LifelineEditPart host = (LifelineEditPart) getHost(); final LifelineFigure primaryShape = host.getPrimaryShape(); // resizable in at least one direction List<Handle> list = new ArrayList<Handle>(); // createMoveHandle(list); Locator locator = new MoveHandleLocator(primaryShape.getFigureLifelineNameContainerFigure()); MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost(), locator); moveHandle.setCursor(Cursors.SIZEALL); list.add(moveHandle); createResizeHandle(list, PositionConstants.NORTH); final RectangleFigure fig = primaryShape.getFigureLifelineNameContainerFigure(); createResizeHandle(host, list, fig, PositionConstants.WEST); createResizeHandle(host, list, fig, PositionConstants.EAST); createResizeHandle(list, PositionConstants.SOUTH); return list; }
/** {@inheritDoc} */ @Override protected Command createDeleteViewCommand(GroupRequest deleteRequest) { CompoundCommand deleteViewsCommand = new CompoundCommand(); /* apex added start */ // Activation의 source connections들을 parent인 lifeline으로 이동하여 연결 if (getHost() instanceof ShapeNodeEditPart) { LifelineEditPart lifelineEP = SequenceUtil.getParentLifelinePart(getHost()); IFigure figure = lifelineEP.getNodeFigure(); Rectangle newBounds = figure.getBounds().getCopy(); figure.translateToAbsolute(newBounds); List connections = ((ShapeNodeEditPart) getHost()).getSourceConnections(); for (Iterator iter = connections.iterator(); iter.hasNext(); ) { ConnectionNodeEditPart connection = (ConnectionNodeEditPart) iter.next(); Point location = SequenceUtil.getAbsoluteEdgeExtremity(connection, true); ReconnectRequest reconnReq = new ReconnectRequest(); reconnReq.setConnectionEditPart(connection); reconnReq.setLocation(location); reconnReq.setTargetEditPart(lifelineEP); reconnReq.setType(RequestConstants.REQ_RECONNECT_SOURCE); reconnReq.getExtendedData().put(SequenceRequestConstant.DO_NOT_MOVE_EDIT_PARTS, true); deleteViewsCommand.add(lifelineEP.getCommand(reconnReq)); } } /* apex added end */ Command deleteViewCommand = super.createDeleteViewCommand(deleteRequest); deleteViewsCommand.add(deleteViewCommand); if (getHost() instanceof ShapeNodeEditPart) { TransactionalEditingDomain editingDomain = ((ShapeNodeEditPart) getHost()).getEditingDomain(); SequenceDeleteHelper.completeDeleteExecutionSpecificationViewCommand( deleteViewsCommand, editingDomain, getHost()); } return deleteViewsCommand; }