]> git.argeo.org Git - lgpl/argeo-commons.git/blob - NewUser.java
de8dc9b54ae79a8520ac948f42681ac646730f15
[lgpl/argeo-commons.git] / NewUser.java
1 package org.argeo.security.ui.admin.commands;
2
3 import org.argeo.security.ui.admin.wizards.NewUserWizard;
4 import org.eclipse.core.commands.AbstractHandler;
5 import org.eclipse.core.commands.ExecutionEvent;
6 import org.eclipse.core.commands.ExecutionException;
7 import org.eclipse.jface.wizard.WizardDialog;
8 import org.eclipse.ui.handlers.HandlerUtil;
9
10 /** Command handler to set visible or open a Argeo user. */
11 public class NewUser extends AbstractHandler {
12
13 public Object execute(ExecutionEvent event) throws ExecutionException {
14 try {
15 NewUserWizard newUserWizard = new NewUserWizard();
16 WizardDialog dialog = new WizardDialog(
17 HandlerUtil.getActiveShell(event), newUserWizard);
18 dialog.open();
19 } catch (Exception e) {
20 throw new ExecutionException("Cannot open editor", e);
21 }
22 return null;
23 }
24 }