refactoring actions in the treeviewer
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / actions / ui / OpenTaxonEditorAction.java
index 445bae36b27ea9b17c4907faaa7f9e5330e522e2..d0d19433966a3bd4389f90b13385af034cbd1a6f 100644 (file)
@@ -64,39 +64,12 @@ public class OpenTaxonEditorAction extends Action implements IWorkbenchWindowAct
        public OpenTaxonEditorAction() {\r
                super(newTaxonText);\r
                setImageDescriptor(image);\r
-//             setActionDefinitionId(ID);\r
                setId(ID);\r
        }\r
        \r
        @Override\r
        public void run() {\r
                \r
-               // Initialize taxon\r
-               if (taxon == null) {\r
-                       \r
-                       // Passing the parser an empty string will return a new\r
-                       //  new name object with the name class specified in the\r
-                       //  preference store, i.e. BotanicalName\r
-                       TaxonNameBase name = CdmParserController.parseFullReference("", null, null);\r
-                       name.setFullTitleCache("", false);\r
-                       name.setTitleCache("", false);\r
-                       this.taxon = Taxon.NewInstance(name, \r
-                                       CdmSessionDataRepository.getDefault().getDefaultSec());\r
-               \r
-                       // Note: don't add taxon to repository - it's not yet valid\r
-\r
-               } else {\r
-                       \r
-                       // If this taxon is not visible in the tree, open node\r
-                       TaxonomicTreeViewer treeViewer = UiUtil.getTreeViewer(); \r
-                       if (treeViewer != null) {\r
-                               treeViewer.revealTaxon(taxon);\r
-                       }\r
-                       \r
-                       // Add to recent names list\r
-                       RecentNamesView.addRecentName(taxon);\r
-               }\r
-               \r
        try {\r
                        UiUtil.openTaxonEditor(taxon);\r
                } catch (PartInitException e) {\r