ref #6913 Remove IEditorInput dependency from alignment editor input
[taxeditor.git] / eu.etaxonomy.taxeditor.molecular / src / main / java / eu / etaxonomy / taxeditor / molecular / handler / EditSequenceHandler.java
index 84b2ce6636c612833895bb1c8d1140b1bc88158d..c76354ad4a638ac230c14eff154d0546b07c27c0 100644 (file)
@@ -9,13 +9,8 @@ import org.eclipse.e4.core.di.annotations.Optional;
 import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
 import org.eclipse.e4.ui.services.IServiceConstants;
 import org.eclipse.jface.viewers.TreeNode;
-import org.eclipse.ui.PartInitException;
 
 import eu.etaxonomy.cdm.model.molecular.Sequence;
-import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
-import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
-import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditorInput;
-import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -32,14 +27,14 @@ public class EditSequenceHandler {
     @Execute
     public void execute(@Optional@Named(IServiceConstants.ACTIVE_SELECTION)TreeNode treeNodeOfSelection) {
         if(treeNodeOfSelection != null && treeNodeOfSelection.getValue() instanceof Sequence){
-            AlignmentEditorInput input = new AlignmentEditorInput(((Sequence)treeNodeOfSelection.getValue()).getUuid());  //TODO Should there always be a new instance created here? What if the specified CDM node is already opened in an AlignmentEditor? => Possible create Singleton that keeps instances by sequence objects in a map.
-            try {
-                TaxeditorMolecularPlugin.getDefault().getWorkbench()
-                .getActiveWorkbenchWindow().getActivePage().openEditor(input, AlignmentEditor.ID);
-            }
-            catch (PartInitException e) {
-                logger.error(Messages.EditSequenceHandler_COULD_NOT_OPEN, e);
-            }
+//            AlignmentEditorInput input = new AlignmentEditorInput(((Sequence)treeNodeOfSelection.getValue()).getUuid());  //TODO Should there always be a new instance created here? What if the specified CDM node is already opened in an AlignmentEditor? => Possible create Singleton that keeps instances by sequence objects in a map.
+//            try {
+//                TaxeditorMolecularPlugin.getDefault().getWorkbench()
+//                .getActiveWorkbenchWindow().getActivePage().openEditor(input, AlignmentEditor.ID);
+//            }
+//            catch (PartInitException e) {
+//                logger.error(Messages.EditSequenceHandler_COULD_NOT_OPEN, e);
+//            }
         }
     }