use of org.knime.workbench.editor2.commands.AddAnnotationCommand in project knime-core by knime.
the class AddAnnotationAction method runOnNodes.
/**
* {@inheritDoc}
*/
@Override
public void runOnNodes(final NodeContainerEditPart[] nodeParts) {
AddAnnotationCommand aac = new AddAnnotationCommand(getManager(), getEditor().getViewer(), new Point(m_x, m_y));
// enables undo
getCommandStack().execute(aac);
// update the actions
getEditor().updateActions();
// Give focus to the editor again. Otherwise the actions (selection)
// is not updated correctly.
getWorkbenchPart().getSite().getPage().activate(getWorkbenchPart());
}
Aggregations