@Test @SuppressWarnings("unchecked") public void testDeleteDocked() { this.tested = new SafeDeleteNodeProcessor(new ChildrenTraverseProcessorImpl(new TreeWalkTraverseProcessorImpl()), graphHolderDocked.graph, graphHolderDocked.dockedNode); tested.run(callback); verify(callback, never()).deleteCandidateConnector(any(Edge.class)); verify(callback, times(1)).removeDock(graphHolderDocked.intermNode, graphHolderDocked.dockedNode); verify(callback, times(1)).deleteCandidateNode(graphHolderDocked.dockedNode); }
@SuppressWarnings("unchecked") public void run(final Callback callback) { final Deque<Node<View, Edge>> nodes = createNodesDequeue(); processedConnectors.clear(); if (!keepChildren) { deleteChildren(callback, nodes); } processNode(candidate, callback, true); graphsProvider.ifPresent(selectedDiagram -> { if (selectedDiagram.isGlobalGraphSelected()) { deleteGlobalGraphNodes(callback, nodes); } }); }
SafeDeleteNodeProcessor { @SuppressWarnings("unchecked") public void run(final Callback callback) { final Deque<Node<View, Edge>> nodes = createNodesDequeue(); processedConnectors.clear(); if (!keepChildren) { deleteChildren(callback, nodes); } processNode(candidate, callback, true); graphsProvider.ifPresent(selectedDiagram -> { if (selectedDiagram.isGlobalGraphSelected()) { deleteGlobalGraphNodes(callback, nodes); } }); } }
SafeDeleteNodeProcessor { @SuppressWarnings("unchecked") public void run(final Callback callback) { final Deque<Node<View, Edge>> nodes = createNodesDequeue(); processedConnectors.clear(); if (!keepChildren) { deleteChildren(callback, nodes); } processNode(candidate, callback, true); graphsProvider.ifPresent(selectedDiagram -> { if (selectedDiagram.isGlobalGraphSelected()) { deleteGlobalGraphNodes(callback, nodes); } }); } SafeDeleteNodeProcessor(final ChildrenTraverseProcessor childrenTraverseProcessor,
                                   final Graph graph,
                                   final Node<Definition<?>, Edge> candidate);  SafeDeleteNodeProcessor(final ChildrenTraverseProcessor childrenTraverseProcessor,
                                   final Graph graph,
                                   final Node<Definition<?>, Edge> candidate,
                                   final boolean keepChildren,
                                   final TreeWalkTraverseProcessor treeWalkTraverseProcessor,
                                   final GraphsProvider graphsProvider); }
SafeDeleteNodeProcessor { @SuppressWarnings("unchecked") public void run(final Callback callback) { final Deque<Node<View, Edge>> nodes = createNodesDequeue(); processedConnectors.clear(); if (!keepChildren) { deleteChildren(callback, nodes); } processNode(candidate, callback, true); graphsProvider.ifPresent(selectedDiagram -> { if (selectedDiagram.isGlobalGraphSelected()) { deleteGlobalGraphNodes(callback, nodes); } }); } SafeDeleteNodeProcessor(final ChildrenTraverseProcessor childrenTraverseProcessor,
                                   final Graph graph,
                                   final Node<Definition<?>, Edge> candidate);  SafeDeleteNodeProcessor(final ChildrenTraverseProcessor childrenTraverseProcessor,
                                   final Graph graph,
                                   final Node<Definition<?>, Edge> candidate,
                                   final boolean keepChildren,
                                   final TreeWalkTraverseProcessor treeWalkTraverseProcessor,
                                   final GraphsProvider graphsProvider); @SuppressWarnings("unchecked") void run(final Callback callback); String getCandidateDiagramId(); String getCandidateContentDefinitionId(); }
SafeDeleteNodeProcessor { @SuppressWarnings("unchecked") public void run(final Callback callback) { final Deque<Node<View, Edge>> nodes = createNodesDequeue(); processedConnectors.clear(); if (!keepChildren) { deleteChildren(callback, nodes); } processNode(candidate, callback, true); graphsProvider.ifPresent(selectedDiagram -> { if (selectedDiagram.isGlobalGraphSelected()) { deleteGlobalGraphNodes(callback, nodes); } }); } SafeDeleteNodeProcessor(final ChildrenTraverseProcessor childrenTraverseProcessor,
                                   final Graph graph,
                                   final Node<Definition<?>, Edge> candidate);  SafeDeleteNodeProcessor(final ChildrenTraverseProcessor childrenTraverseProcessor,
                                   final Graph graph,
                                   final Node<Definition<?>, Edge> candidate,
                                   final boolean keepChildren,
                                   final TreeWalkTraverseProcessor treeWalkTraverseProcessor,
                                   final GraphsProvider graphsProvider); @SuppressWarnings("unchecked") void run(final Callback callback); String getCandidateDiagramId(); String getCandidateContentDefinitionId();  }