]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - OpenGenericNodeEditor.java
63d53fa3f800c78904f88890149b50cd5651a216
1 package org
.argeo
.jcr
.ui
.explorer
.commands
;
3 import org
.apache
.commons
.logging
.Log
;
4 import org
.apache
.commons
.logging
.LogFactory
;
5 import org
.argeo
.ArgeoException
;
6 import org
.argeo
.eclipse
.ui
.jcr
.editors
.NodeEditorInput
;
7 import org
.argeo
.jcr
.ui
.explorer
.editors
.GenericNodeEditor
;
8 import org
.eclipse
.core
.commands
.AbstractHandler
;
9 import org
.eclipse
.core
.commands
.ExecutionEvent
;
10 import org
.eclipse
.core
.commands
.ExecutionException
;
11 import org
.eclipse
.ui
.handlers
.HandlerUtil
;
13 public class OpenGenericNodeEditor
extends AbstractHandler
{
14 private final static Log log
= LogFactory
15 .getLog(OpenGenericNodeEditor
.class);
16 public final static String ID
= "org.argeo.jcr.ui.explorer.openGenericNodeEditor";
17 public final static String PARAM_PATH
= "org.argeo.jcr.ui.explorer.nodePath";
19 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
20 String path
= event
.getParameter(PARAM_PATH
);
22 NodeEditorInput nei
= new NodeEditorInput(path
);
23 HandlerUtil
.getActiveWorkbenchWindow(event
).getActivePage()
24 .openEditor(nei
, GenericNodeEditor
.ID
);
25 } catch (Exception e
) {
26 throw new ArgeoException("Cannot open editor", e
);