+ IWorkbenchPage iwp = HandlerUtil.getActiveWorkbenchWindow(event)
+ .getActivePage();
+
+ for (User user : users) {
+ String userName = user.getName();
+ // TODO find a way to close the editor cleanly if opened. Cannot be
+ // done through the UserAdminListeners, it causes a
+ // java.util.ConcurrentModificationException because disposing the
+ // editor unregisters and disposes the listener
+ IEditorPart part = iwp.findEditor(new UserEditorInput(userName));
+ if (part != null)
+ iwp.closeEditor(part, false);
+ userAdmin.removeRole(userName);
+ }
+ userAdminWrapper.commitOrNotifyTransactionStateChange();
+