+// $Id$\r
+/**\r
+* Copyright (C) 2015 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.handler.alignmenteditor;\r
+\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.ui.IEditorPart;\r
+\r
+import eu.etaxonomy.taxeditor.editor.molecular.AlignmentEditor;\r
+import eu.etaxonomy.taxeditor.model.AbstractUtility;\r
+import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
+\r
+\r
+\r
+/**\r
+ * Handler that cuts the base call sequence of a pherogram attached to the current sequence on the left\r
+ * of the current selection or cursor position.\r
+ *\r
+ * @author Ben Stöver\r
+ * @date 15.06.2015\r
+ */\r
+public class CutPherogramLeftHandler extends AbstractHandler {\r
+ @Override\r
+ public Object execute(ExecutionEvent event) throws ExecutionException {\r
+ IEditorPart activeEditor = AbstractUtility.getActiveEditor();\r
+ if (activeEditor instanceof AlignmentEditor) {\r
+ String errorMessage = ((AlignmentEditor)activeEditor).cutPherogramLeft();\r
+ if (errorMessage != null) {\r
+ MessagingUtils.errorDialog("Unable to cut base call sequence", this, errorMessage, "eu.etaxonomy.taxeditor.editor", null, false); //TODO set pluginID\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+}\r