use of org.knime.workbench.editor2.commands.PasteFromWorkflowPersistorCommand in project knime-core by knime.
the class PasteAction method runOnNodes.
/**
* {@inheritDoc}
*/
@Override
public void runOnNodes(final NodeContainerEditPart[] nodeParts) {
ClipboardObject clipObject = getEditor().getClipboardContent();
ShiftCalculator shiftCalculator = newShiftCalculator();
PasteFromWorkflowPersistorCommand pasteCommand = new PasteFromWorkflowPersistorCommand(getEditor(), clipObject, shiftCalculator);
// enables undo
getCommandStack().execute(pasteCommand);
// 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