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);
}
}
- 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);
+ }
}
}
}
}
}
- /**
- * <p>openEditor</p>
- *
- * @param configuration a eu.etaxonomy.taxeditor.editor.OpenEditorConfiguration object.
- */
- public static void openEditor(OpenEditorConfiguration configuration) {
-
- }
-
/**
* <p>getShell</p>
*
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;
}