SearchResultView opens on the left again.
authorn.hoffmann <n.hoffmann@localhost>
Fri, 11 Mar 2011 10:58:37 +0000 (10:58 +0000)
committern.hoffmann <n.hoffmann@localhost>
Fri, 11 Mar 2011 10:58:37 +0000 (10:58 +0000)
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/Taxonomic.java
taxeditor-navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java
taxeditor-navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/EditHandler.java

index c36ae329db9953d150315a4cf1e16a8373389fbe..09fa916ee5f9b51c5efeb956593fae949f3656fe 100644 (file)
@@ -35,7 +35,7 @@ public class Taxonomic extends Default {
                IFolderLayout navigationFolder = layout.createFolder("navigation", IPageLayout.LEFT, 0.25f, layout.getEditorArea());
                
                navigationFolder.addView(TaxonNavigator.ID);
-               navigationFolder.addPlaceholder(SearchResultView.ID);
+               navigationFolder.addPlaceholder(SearchResultView.ID + ":*");
                
                layout.addView(DetailsViewPart.ID, IPageLayout.RIGHT, 0.25f, layout.getEditorArea());
                layout.addView(SupplementalDataViewPart.ID, IPageLayout.BOTTOM, 0.25f, DetailsViewPart.ID);
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>
         *
index 814219f49733e303951c0ccadaa576f9a34013ea..1abd3c415682f1172b0e1a508d78cb7d15818be8 100644 (file)
@@ -66,15 +66,13 @@ public class EditHandler extends AbstractHandler implements IHandler{
                                        protected IStatus run(IProgressMonitor monitor) {
                                                for(final Object selectedObject : structuredSelection.toArray()){
                                                        
-                                                       if(selectedObject instanceof TaxonNode){
-                                                               Display.getDefault().asyncExec(new Runnable(){
+                                                       Display.getDefault().asyncExec(new Runnable(){
        
-                                                                       public void run() {
-                                                                               NavigationUtil.openEditor((TaxonNode) selectedObject);
-                                                                       }
-                                                                       
-                                                               });
-                                                       }
+                                                               public void run() {
+                                                                       NavigationUtil.openEditor(selectedObject);
+                                                               }
+                                                               
+                                                       });
                                                }
                                                return Status.OK_STATUS;
                                        }