@Test @SuppressWarnings("unchecked") public void testExecute() { super.testExecute(); verify(candidateDefinition).setParent(eq(parentDefinition)); verify(candidateDefinitionName).setValue(candidateDefinitionNameCaptor.capture()); final String name = candidateDefinitionNameCaptor.getValue(); assertThat(name).startsWith(Decision.class.getSimpleName()); assertThat(name).endsWith("-1"); }
@Override protected void execute(final GraphCommandExecutionContext context, final Node<?, Edge> parent, final Node<?, Edge> candidate) { super.execute(context, parent, candidate); if (parent.getContent() instanceof View) { final DMNModelInstrumentedBase parentDMNModel = (DMNModelInstrumentedBase) ((View) parent.getContent()).getDefinition(); if (candidate.getContent() instanceof View) { final DMNModelInstrumentedBase childDMNModel = (DMNModelInstrumentedBase) ((View) candidate.getContent()).getDefinition(); childDMNModel.setParent(parentDMNModel); DefaultValueUtilities.updateNewNodeName(getGraph(context), childDMNModel); } } }
SetChildrenCommand extends org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand { @Override protected void execute(final GraphCommandExecutionContext context, final Node<?, Edge> parent, final Node<?, Edge> candidate) { super.execute(context, parent, candidate); if (parent.getContent() instanceof View) { final DMNModelInstrumentedBase parentDMNModel = (DMNModelInstrumentedBase) ((View) parent.getContent()).getDefinition(); if (candidate.getContent() instanceof View) { final DMNModelInstrumentedBase childDMNModel = (DMNModelInstrumentedBase) ((View) candidate.getContent()).getDefinition(); childDMNModel.setParent(parentDMNModel); DefaultValueUtilities.updateNewNodeName(getGraph(context), childDMNModel); } } } }
SetChildrenCommand extends org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand { @Override protected void execute(final GraphCommandExecutionContext context, final Node<?, Edge> parent, final Node<?, Edge> candidate) { super.execute(context, parent, candidate); if (parent.getContent() instanceof View) { final DMNModelInstrumentedBase parentDMNModel = (DMNModelInstrumentedBase) ((View) parent.getContent()).getDefinition(); if (candidate.getContent() instanceof View) { final DMNModelInstrumentedBase childDMNModel = (DMNModelInstrumentedBase) ((View) candidate.getContent()).getDefinition(); childDMNModel.setParent(parentDMNModel); DefaultValueUtilities.updateNewNodeName(getGraph(context), childDMNModel); } } } SetChildrenCommand(final @MapsTo("parentUUID") String parentUUID,
                              final @MapsTo("candidateUUIDs") String[] candidateUUIDs);  SetChildrenCommand(final Node<?, Edge> parent,
                              final Node<?, Edge> candidate); }
SetChildrenCommand extends org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand { @Override protected void execute(final GraphCommandExecutionContext context, final Node<?, Edge> parent, final Node<?, Edge> candidate) { super.execute(context, parent, candidate); if (parent.getContent() instanceof View) { final DMNModelInstrumentedBase parentDMNModel = (DMNModelInstrumentedBase) ((View) parent.getContent()).getDefinition(); if (candidate.getContent() instanceof View) { final DMNModelInstrumentedBase childDMNModel = (DMNModelInstrumentedBase) ((View) candidate.getContent()).getDefinition(); childDMNModel.setParent(parentDMNModel); DefaultValueUtilities.updateNewNodeName(getGraph(context), childDMNModel); } } } SetChildrenCommand(final @MapsTo("parentUUID") String parentUUID,
                              final @MapsTo("candidateUUIDs") String[] candidateUUIDs);  SetChildrenCommand(final Node<?, Edge> parent,
                              final Node<?, Edge> candidate);  }
SetChildrenCommand extends org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand { @Override protected void execute(final GraphCommandExecutionContext context, final Node<?, Edge> parent, final Node<?, Edge> candidate) { super.execute(context, parent, candidate); if (parent.getContent() instanceof View) { final DMNModelInstrumentedBase parentDMNModel = (DMNModelInstrumentedBase) ((View) parent.getContent()).getDefinition(); if (candidate.getContent() instanceof View) { final DMNModelInstrumentedBase childDMNModel = (DMNModelInstrumentedBase) ((View) candidate.getContent()).getDefinition(); childDMNModel.setParent(parentDMNModel); DefaultValueUtilities.updateNewNodeName(getGraph(context), childDMNModel); } } } SetChildrenCommand(final @MapsTo("parentUUID") String parentUUID,
                              final @MapsTo("candidateUUIDs") String[] candidateUUIDs);  SetChildrenCommand(final Node<?, Edge> parent,
                              final Node<?, Edge> candidate);   }