use of org.knime.workbench.editor2.commands.DisconnectMetaNodeLinkCommand in project knime-core by knime.
the class DisconnectMetaNodeLinkAction method runOnNodes.
/**
* {@inheritDoc}
*/
@Override
public void runOnNodes(final NodeContainerEditPart[] nodeParts) {
List<NodeID> idList = new ArrayList<NodeID>();
for (NodeContainerEditPart p : nodeParts) {
Object model = p.getModel();
if (model instanceof WorkflowManagerUI) {
WorkflowManagerUI wm = (WorkflowManagerUI) model;
MetaNodeTemplateInformation i = unwrapWFM(wm).getTemplateInformation();
if (Role.Link.equals(i.getRole())) {
idList.add(wm.getID());
}
}
}
NodeID[] ids = idList.toArray(new NodeID[idList.size()]);
DisconnectMetaNodeLinkCommand disCmd = new DisconnectMetaNodeLinkCommand(getManager(), ids);
execute(disCmd);
}
Aggregations