@Test public void testExecute() throws Exception { tested.execute(canvasHandler); verify(canvasHandler, times(1)).deregister(eq(rootShape), eq(rootNode), eq(true)); verify(canvasHandler, times(1)).register(eq(SHAPE_SET_ID), eq(rootNode)); }
@Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final CommandResult<CanvasViolation> result = super.execute(context); final Node<View, Edge> node = context.getGraphIndex().getNode(rootUUID); context.deregister(rootShape, node, true); context.register(context.getDiagram().getMetadata().getShapeSetId(), node); return result; }
CaseManagementClearCommand extends ClearCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final CommandResult<CanvasViolation> result = super.execute(context); final Node<View, Edge> node = context.getGraphIndex().getNode(rootUUID); context.deregister(rootShape, node, true); context.register(context.getDiagram().getMetadata().getShapeSetId(), node); return result; } }
CaseManagementClearCommand extends ClearCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final CommandResult<CanvasViolation> result = super.execute(context); final Node<View, Edge> node = context.getGraphIndex().getNode(rootUUID); context.deregister(rootShape, node, true); context.register(context.getDiagram().getMetadata().getShapeSetId(), node); return result; }  }
CaseManagementClearCommand extends ClearCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final CommandResult<CanvasViolation> result = super.execute(context); final Node<View, Edge> node = context.getGraphIndex().getNode(rootUUID); context.deregister(rootShape, node, true); context.register(context.getDiagram().getMetadata().getShapeSetId(), node); return result; }  @Override @SuppressWarnings("unchecked") CommandResult<CanvasViolation> execute(AbstractCanvasHandler context); }
CaseManagementClearCommand extends ClearCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final CommandResult<CanvasViolation> result = super.execute(context); final Node<View, Edge> node = context.getGraphIndex().getNode(rootUUID); context.deregister(rootShape, node, true); context.register(context.getDiagram().getMetadata().getShapeSetId(), node); return result; }  @Override @SuppressWarnings("unchecked") CommandResult<CanvasViolation> execute(AbstractCanvasHandler context);  }