4 package eu
.etaxonomy
.taxeditor
.editor
;
6 import org
.eclipse
.core
.commands
.AbstractHandler
;
7 import org
.eclipse
.core
.commands
.ExecutionEvent
;
8 import org
.eclipse
.core
.commands
.ExecutionException
;
9 import org
.eclipse
.core
.commands
.IHandler
;
10 import org
.eclipse
.ui
.IWorkbenchPage
;
11 import org
.eclipse
.ui
.IWorkbenchWindow
;
12 import org
.eclipse
.ui
.PartInitException
;
14 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
15 import eu
.etaxonomy
.taxeditor
.editor
.internal
.TaxeditorEditorPlugin
;
21 public class TestOpenHandler
extends AbstractHandler
implements IHandler
{
23 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
27 Taxon taxon
= Taxon
.NewInstance(null, null);
29 // TaxonEditorInput input = new TaxonEditorInput(taxon);
31 IWorkbenchWindow def
= TaxeditorEditorPlugin
.getDefault().getWorkbench().getActiveWorkbenchWindow();
34 // def.openPage(input);
35 // } catch (WorkbenchException e1) {
36 // e1.printStackTrace();
40 // IWorkbenchPage page = def.getActivePage();
43 // page.openEditor(input, "eu.etaxonomy.taxeditor.editor.editor");
44 // } catch (PartInitException e) {
45 // e.printStackTrace();