use of org.knime.workbench.editor2.UpdateMetaNodeTemplateRunnable in project knime-core by knime.
the class UpdateMetaNodeLinkCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute() {
UpdateMetaNodeTemplateRunnable updateRunner = null;
try {
IWorkbench wb = PlatformUI.getWorkbench();
IProgressService ps = wb.getProgressService();
WorkflowManager hostWFM = getHostWFM();
updateRunner = new UpdateMetaNodeTemplateRunnable(hostWFM, m_ids);
ps.busyCursorWhile(updateRunner);
m_newIDs = updateRunner.getNewIDs();
m_undoPersistors = updateRunner.getUndoPersistors();
assert m_newIDs.size() == m_undoPersistors.size();
} catch (Exception ex) {
// if fails notify the user
LOGGER.debug("Node cannot be created.", ex);
MessageDialog.openWarning(Display.getDefault().getActiveShell(), "Node cannot be created.", "The selected node could not be created " + "due to the following reason:\n" + ex.getMessage());
return;
} finally {
if (updateRunner != null) {
updateRunner.discard();
}
}
}
Aggregations