Search in sources :

Example 1 with SubnodeWizardDialog

use of org.knime.workbench.editor2.subnode.SubnodeWizardDialog in project knime-core by knime.

the class SubNodeReconfigureAction method runOnNodes.

/**
 * {@inheritDoc}
 */
@Override
public void runOnNodes(final NodeContainerEditPart[] nodeParts) {
    if (nodeParts.length < 1) {
        return;
    }
    NodeContainerEditPart ep = nodeParts[0];
    SubNodeContainerUI subnodeNC = (SubNodeContainerUI) ep.getModel();
    if (!Wrapper.unwrap(subnodeNC, SubNodeContainer.class).getWorkflowManager().unlock(new GUIWorkflowCipherPrompt())) {
        return;
    }
    SetupSubnodeWizard wizard = new SetupSubnodeWizard(ep.getViewer(), Wrapper.unwrap(subnodeNC, SubNodeContainer.class));
    SubnodeWizardDialog dlg = new SubnodeWizardDialog(Display.getCurrent().getActiveShell(), wizard);
    dlg.create();
    dlg.open();
}
Also used : SubNodeContainer(org.knime.core.node.workflow.SubNodeContainer) SubnodeWizardDialog(org.knime.workbench.editor2.subnode.SubnodeWizardDialog) NodeContainerEditPart(org.knime.workbench.editor2.editparts.NodeContainerEditPart) SubNodeContainerUI(org.knime.core.ui.node.workflow.SubNodeContainerUI) GUIWorkflowCipherPrompt(org.knime.workbench.editor2.editparts.GUIWorkflowCipherPrompt) SetupSubnodeWizard(org.knime.workbench.editor2.subnode.SetupSubnodeWizard)

Aggregations

SubNodeContainer (org.knime.core.node.workflow.SubNodeContainer)1 SubNodeContainerUI (org.knime.core.ui.node.workflow.SubNodeContainerUI)1 GUIWorkflowCipherPrompt (org.knime.workbench.editor2.editparts.GUIWorkflowCipherPrompt)1 NodeContainerEditPart (org.knime.workbench.editor2.editparts.NodeContainerEditPart)1 SetupSubnodeWizard (org.knime.workbench.editor2.subnode.SetupSubnodeWizard)1 SubnodeWizardDialog (org.knime.workbench.editor2.subnode.SubnodeWizardDialog)1