public void init(IWorkbench workbench, IStructuredSelection selection) { this.selection = selection; IWorkingSet workingSet = SelectionUtil.getSelectedWorkingSet(selection); if (workingSet != null) { this.workingSets.add(workingSet); } }
protected void copySelection(final Point selectionStart, final Point selectionEnd) { if (selectionStart == null || selectionEnd == null) { return; } final String selectionText = SelectionUtil.getSelectionText(selectionStart, selectionEnd, myTerminalTextBuffer); if (selectionText.length() != 0) { try { setCopyContents(new StringSelection(selectionText)); } catch (final IllegalStateException e) { LOG.error("Could not set clipboard:", e); } } }