switched to cdmlib 2.0
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / navigation / SearchResultView.java
index 3c25fea442c9c7c495cc25d2b30461e8f3f6748b..fe93afaac655ca0c568438736e183a99f14cb796 100644 (file)
@@ -69,7 +69,7 @@ public class SearchResultView extends ViewPart {
                                        IdentifiableEntity selection = (IdentifiableEntity) ((StructuredSelection) event.getSelection()).getFirstElement();\r
                                        \r
                                        if(selection instanceof TaxonBase){\r
-                                               openTaxonEditor((TaxonBase) selection);\r
+                                               EditorController.openTaxonEditor((TaxonBase) selection);\r
                                        }\r
                                } catch (Exception e) {\r
                                        logger.error("Error opening editor from search result", e);\r
@@ -78,29 +78,11 @@ public class SearchResultView extends ViewPart {
                });\r
        }\r
 \r
-       protected void openTaxonEditor(TaxonBase taxonBase) {\r
-\r
-               Taxon taxon = null;\r
-               if (taxonBase instanceof Synonym) {\r
-                       // TODO: in case of pro parte synonym or any other where we might have multiple\r
-                       // accepted taxa we have to provide a mechanism that can deal with that\r
-                       // TODO set focus to the synonym\r
-                       taxon = (Taxon) ((Synonym) taxonBase).getAcceptedTaxa().toArray()[0];\r
-               } else {\r
-                       taxon = (Taxon) taxonBase;\r
-               }\r
-\r
-               // Open a taxon editor\r
-               EditorController.open(taxon);\r
-\r
-       }\r
-\r
        /* (non-Javadoc)\r
         * @see org.eclipse.ui.part.WorkbenchPart#setFocus()\r
         */\r
        @Override\r
        public void setFocus() {\r
-               // TODO Auto-generated method stub\r
 \r
        }\r
        private void initializeToolBar() {\r