Project

General

Profile

Download (1.42 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2015 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.molecular.editor.e4.handler;
10

    
11

    
12
import javax.inject.Named;
13

    
14
import org.eclipse.e4.core.di.annotations.Execute;
15
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
16
import org.eclipse.e4.ui.services.IServiceConstants;
17

    
18
import eu.etaxonomy.taxeditor.model.MessagingUtils;
19
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
20
import eu.etaxonomy.taxeditor.molecular.editor.e4.AlignmentEditorE4;
21
import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
22

    
23

    
24

    
25
/**
26
 * Handler that cuts the base call sequence of a pherogram attached to the current sequence on the right
27
 * of the current selection or cursor position.
28
 *
29
 * @author BenStoever
30
 * @date 15.06.2015
31
 */
32
public class CutPherogramRightHandlerE4 {
33

    
34
    @Execute
35
    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart) {
36
        AlignmentEditorE4 editor = (AlignmentEditorE4) activePart.getObject();
37
        String errorMessage = editor.cutPherogramRight();
38
        if (errorMessage != null) {
39
            MessagingUtils.errorDialog(Messages.CutPherogramRightHandler_CUT_FAILURE, this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
40
        }
41
    }
42
}
(7-7/17)