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;
@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);
+// }
}
}