1
|
/**
|
2
|
* Copyright (C) 2009 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.editor.definedterm.handler;
|
11
|
import org.eclipse.core.commands.AbstractHandler;
|
12
|
import org.eclipse.core.commands.ExecutionEvent;
|
13
|
import org.eclipse.core.commands.ExecutionException;
|
14
|
import org.eclipse.core.commands.IHandler;
|
15
|
|
16
|
|
17
|
/**
|
18
|
* @author l.morris
|
19
|
* @date 8 Dec 2011
|
20
|
*
|
21
|
*/
|
22
|
public class OpenDefinedTermEditorHandler extends AbstractHandler implements IHandler {
|
23
|
|
24
|
/* (non-Javadoc)
|
25
|
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
|
26
|
*/
|
27
|
@Override
|
28
|
public Object execute(ExecutionEvent event) throws ExecutionException {
|
29
|
|
30
|
// String termTypeUuid = event.getParameter("eu.etaxonomy.taxeditor.store.openDefinedTermEditor.termTypeUuid");
|
31
|
// IWorkbenchPage activePage = StoreUtil.getActivePage();
|
32
|
// try {
|
33
|
// activePage.openEditor(new TermEditorInput(TermType.getByUuid(UUID.fromString(termTypeUuid))), DefinedTermEditor.ID);
|
34
|
// } catch (PartInitException e) {
|
35
|
//
|
36
|
// String PID = "eu.etaxonomy.taxeditor.application";
|
37
|
// MultiStatus info = new MultiStatus(PID, 1, "You might be missing sufficient permissions to open the Defined Term Editor", null);
|
38
|
// info.add(new Status(IStatus.WARNING, PID, 1, e.getMessage(), null));
|
39
|
// MessagingUtils.warningDialog("Cannot open Defined Term Editor", getClass(), info);
|
40
|
// }
|
41
|
|
42
|
return null;
|
43
|
}
|
44
|
|
45
|
}
|