Search in sources :

Example 1 with ConfigureMetaNodePortsPage

use of org.knime.workbench.editor2.meta.ConfigureMetaNodePortsPage in project knime-core by knime.

the class SetupSubnodeWizard method addPages.

/**
 * {@inheritDoc}
 */
@Override
public void addPages() {
    setWindowTitle("Setup Wrapped Metanode Wizard");
    setDefaultPageImageDescriptor(ImageDescriptor.createFromImage(ImageRepository.getImage(KNIMEEditorPlugin.PLUGIN_ID, "icons/meta/meta_node_wizard2.png")));
    WorkflowManager wfManager = m_subNode.getWorkflowManager();
    Map<NodeID, NodeModel> allNodes = wfManager.findNodes(NodeModel.class, false);
    LinkedHashMap<NodeID, NodeModel> usageNodes = new LinkedHashMap<NodeID, NodeModel>();
    List<NodeID> nodeIDs = new ArrayList<NodeID>();
    nodeIDs.addAll(allNodes.keySet());
    Collections.sort(nodeIDs);
    for (NodeID id : nodeIDs) {
        NodeModel model = allNodes.get(id);
        if (considerNodeForUsage(model)) {
            usageNodes.put(id, model);
        }
    }
    m_portsPage = new ConfigureMetaNodePortsPage("Change the Wrapped Metanode configuration");
    m_portsPage.setSubNode(m_subNode);
    m_portsPage.setTemplate(null);
    addPage(m_portsPage);
}
Also used : NodeModel(org.knime.core.node.NodeModel) WorkflowManager(org.knime.core.node.workflow.WorkflowManager) NodeID(org.knime.core.node.workflow.NodeID) ArrayList(java.util.ArrayList) ConfigureMetaNodePortsPage(org.knime.workbench.editor2.meta.ConfigureMetaNodePortsPage) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

ArrayList (java.util.ArrayList)1 LinkedHashMap (java.util.LinkedHashMap)1 NodeModel (org.knime.core.node.NodeModel)1 NodeID (org.knime.core.node.workflow.NodeID)1 WorkflowManager (org.knime.core.node.workflow.WorkflowManager)1 ConfigureMetaNodePortsPage (org.knime.workbench.editor2.meta.ConfigureMetaNodePortsPage)1