1
|
package eu.etaxonomy.taxeditor.molecular.handler;
|
2
|
|
3
|
|
4
|
import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
|
5
|
|
6
|
import org.eclipse.core.commands.ExecutionEvent;
|
7
|
|
8
|
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
|
9
|
|
10
|
|
11
|
|
12
|
/**
|
13
|
* Handler that cuts the currently selected nucleotides from an alignment editor to the clipboard.
|
14
|
* <p>
|
15
|
* The cut contents either come from the single reads or the consensus sequence alignment area,
|
16
|
* depending on which component currently has the focus. If none of these components has the focus,
|
17
|
* nothing will be cut, even if nucleotides are currently selected.
|
18
|
* <p>
|
19
|
* If the selection contains parts of multiple sequence, these are separated by the line separator
|
20
|
* of the current operating system.
|
21
|
*
|
22
|
* @author Ben Stöver
|
23
|
* @date 25.08.2015
|
24
|
*/
|
25
|
public class AlignmentEditorCutHandler extends AlignmentEditorCopyHandler {
|
26
|
@Override
|
27
|
protected void doExecute2(ExecutionEvent event, AlignmentEditor editor, AlignmentArea focusedArea) {
|
28
|
super.doExecute2(event, editor, focusedArea); // Copy selected contents.
|
29
|
focusedArea.getActionProvider().deleteSelection();
|
30
|
}
|
31
|
}
|