Removed unused class ContextMenu
[taxeditor.git] / taxeditor-editor / src / test / java / eu / etaxonomy / taxeditor / editor / TestOpenHandler.java
1 /**
2 *
3 */
4 package eu.etaxonomy.taxeditor.editor;
5
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;
13
14 import eu.etaxonomy.cdm.model.taxon.Taxon;
15 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
16
17 /**
18 * @author nho
19 *
20 */
21 public class TestOpenHandler extends AbstractHandler implements IHandler {
22
23 public Object execute(ExecutionEvent event) throws ExecutionException {
24
25
26
27 Taxon taxon = Taxon.NewInstance(null, null);
28
29 // TaxonEditorInput input = new TaxonEditorInput(taxon);
30
31 IWorkbenchWindow def = TaxeditorEditorPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
32
33 // try {
34 // def.openPage(input);
35 // } catch (WorkbenchException e1) {
36 // e1.printStackTrace();
37 // }
38
39 //
40 // IWorkbenchPage page = def.getActivePage();
41 //
42 // try {
43 // page.openEditor(input, "eu.etaxonomy.taxeditor.editor.editor");
44 // } catch (PartInitException e) {
45 // e.printStackTrace();
46 // }
47 // return true;
48 //
49 return null;
50 }
51
52 }