Search in sources :

Example 1 with RegisterNodeCommand

use of org.kie.workbench.common.stunner.core.graph.command.impl.RegisterNodeCommand in project kie-wb-common by kiegroup.

the class CaseManagementAddChildNodeGraphCommand method initialize.

@Override
protected CaseManagementAddChildNodeGraphCommand initialize(final GraphCommandExecutionContext context) {
    final Node parent = getParent(context);
    final Node child = getCandidate();
    this.addCommand(new RegisterNodeCommand(child));
    this.addCommand(new CaseManagementSetChildNodeGraphCommand(parent, child, Optional.of(0), Optional.empty(), Optional.empty()));
    return this;
}
Also used : RegisterNodeCommand(org.kie.workbench.common.stunner.core.graph.command.impl.RegisterNodeCommand) Node(org.kie.workbench.common.stunner.core.graph.Node)

Aggregations

Node (org.kie.workbench.common.stunner.core.graph.Node)1 RegisterNodeCommand (org.kie.workbench.common.stunner.core.graph.command.impl.RegisterNodeCommand)1