Search in sources :

Example 1 with WrappedMultipleNodeDialog

use of org.knime.workbench.ui.wrapper.WrappedMultipleNodeDialog in project knime-core by knime.

the class OpenMultiDialogAction method runOnNodes.

/**
 * {@inheritDoc}
 */
@Override
public void runOnNodes(final NodeContainerEditPart[] nodeParts) {
    NodeID[] nodes = new NodeID[nodeParts.length];
    SplitType splitType = SplitType.USER;
    for (int i = 0; i < nodeParts.length; i++) {
        NodeContainerUI nc = nodeParts[i].getNodeContainer();
        nodes[i] = nc.getID();
        if (nc instanceof WorkflowManagerUI) {
            // one metanode disables splitting
            splitType = SplitType.DISALLOWED;
        }
    }
    WrappedMultipleNodeDialog dlg = new WrappedMultipleNodeDialog(Display.getCurrent().getActiveShell(), getManager(), splitType, nodes);
    // the dialog applies new settings on OK
    dlg.open();
}
Also used : NodeContainerUI(org.knime.core.ui.node.workflow.NodeContainerUI) NodeID(org.knime.core.node.workflow.NodeID) SplitType(org.knime.core.node.workflow.NodeContainer.NodeContainerSettings.SplitType) WorkflowManagerUI(org.knime.core.ui.node.workflow.WorkflowManagerUI) WrappedMultipleNodeDialog(org.knime.workbench.ui.wrapper.WrappedMultipleNodeDialog)

Aggregations

SplitType (org.knime.core.node.workflow.NodeContainer.NodeContainerSettings.SplitType)1 NodeID (org.knime.core.node.workflow.NodeID)1 NodeContainerUI (org.knime.core.ui.node.workflow.NodeContainerUI)1 WorkflowManagerUI (org.knime.core.ui.node.workflow.WorkflowManagerUI)1 WrappedMultipleNodeDialog (org.knime.workbench.ui.wrapper.WrappedMultipleNodeDialog)1