- EditorUtil.warningDialog("Could not create Taxon", NavigationUtil.class, e.getMessage());
- }
- }
-
- public static void openEditor(Object selectedObject){
- if (selectedObject instanceof UuidAndTitleCache){
- Class type = ((UuidAndTitleCache) selectedObject).getType();
- if(type == Taxon.class || type == Synonym.class){
- try {
- EditorUtil.openTaxonBase(((UuidAndTitleCache) selectedObject).getUuid());
- } catch (PartInitException e) {
- NavigationUtil.error(NavigationUtil.class, "Error opening the editor", e);
- }
- }
- }else if(selectedObject instanceof ICdmBase){
- openEditor((ICdmBase) selectedObject);
- }else{
- NavigationUtil.error(NavigationUtil.class, new IllegalArgumentException("Selected object is not supported: " + selectedObject));
+ MessagingUtils.errorDialog("Could not create Taxon",
+ NavigationUtil.class,
+ e.getMessage(), TaxeditorStorePlugin.PLUGIN_ID,
+ e,
+ true);
+