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
});\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