]> git.argeo.org Git - lgpl/argeo-commons.git/blob - OpenChangePasswordDialog.java
bd6da36570d0e4fa1177bcca64bc242bef353000
[lgpl/argeo-commons.git] / OpenChangePasswordDialog.java
1 package org.argeo.security.ui.commands;
2
3 import org.argeo.security.CurrentUserService;
4 import org.argeo.security.ui.dialogs.ChangePasswordDialog;
5 import org.eclipse.core.commands.AbstractHandler;
6 import org.eclipse.core.commands.ExecutionEvent;
7 import org.eclipse.core.commands.ExecutionException;
8 import org.eclipse.ui.handlers.HandlerUtil;
9
10 /** Opens the change password dialog. */
11 public class OpenChangePasswordDialog extends AbstractHandler {
12 private CurrentUserService currentUserService;
13
14 public Object execute(ExecutionEvent event) throws ExecutionException {
15 ChangePasswordDialog dialog = new ChangePasswordDialog(
16 HandlerUtil.getActiveShell(event), currentUserService);
17 dialog.open();
18 return null;
19 }
20
21 public void setCurrentUserService(CurrentUserService currentUserService) {
22 this.currentUserService = currentUserService;
23 }
24
25 }