SearchResultView opens on the left again.
[taxeditor.git] / taxeditor-navigation / src / main / java / eu / etaxonomy / taxeditor / navigation / NavigationUtil.java
index 49d8a37abb5afc02b5ee7c744558df059cc0694e..c54e8bac2782408e146f56136225d22785669382 100644 (file)
@@ -102,13 +102,15 @@ public class NavigationUtil extends AbstractUtility{
                }
        }
        
-       public static void openEditor(UuidAndTitleCache selectedObject){
-               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);
+       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);
+                               }
                        }
                }
        }
@@ -126,15 +128,6 @@ public class NavigationUtil extends AbstractUtility{
                }
        }
        
-       /**
-        * <p>openEditor</p>
-        *
-        * @param configuration a eu.etaxonomy.taxeditor.editor.OpenEditorConfiguration object.
-        */
-       public static void openEditor(OpenEditorConfiguration configuration) {
-               
-       }
-       
        /**
         * <p>getShell</p>
         *