]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - security/eclipse/plugins/org.argeo.security.ui/src/main/java/org/argeo/security/ui/commands/SaveArgeoUser.java
1 package org
.argeo
.security
.ui
.commands
;
3 import org
.eclipse
.core
.commands
.AbstractHandler
;
4 import org
.eclipse
.core
.commands
.ExecutionEvent
;
5 import org
.eclipse
.core
.commands
.ExecutionException
;
6 import org
.eclipse
.ui
.IEditorPart
;
7 import org
.eclipse
.ui
.IWorkbenchPart
;
8 import org
.eclipse
.ui
.handlers
.HandlerUtil
;
10 /** Save the currently edited Argeo user. */
11 public class SaveArgeoUser
extends AbstractHandler
{
12 public final static String COMMAND_ID
= "org.argeo.security.ui.saveArgeoUser";
14 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
16 IWorkbenchPart iwp
= HandlerUtil
.getActiveWorkbenchWindow(event
)
17 .getActivePage().getActivePart();
19 if (!(iwp
instanceof IEditorPart
))
21 IEditorPart editor
= (IEditorPart
) iwp
;
23 } catch (Exception e
) {
24 throw new ExecutionException("Cannot save user", e
);