- String entityEditorId = getEditorId(user);
- MPart part = partService.createPart(entityEditorId);
- part.setLabel(user.toString());
- part.getPersistedState().put(LdapAttrs.uid.name(), user.getName());
-
- // the provided part is be shown
- partService.showPart(part, PartState.ACTIVATE);
-
- // IWorkbenchWindow iww = WorkbenchUiPlugin.getDefault().getWorkbench()
- // .getActiveWorkbenchWindow();
- // IWorkbenchPage iwp = iww.getActivePage();
- // UserEditorInput uei = new UserEditorInput(user.getName());
- // FIXME open editor
-
- try {
- // Works around the fact that dynamic setting of the editor icon
- // causes NPE after a login/logout on RAP
- // if (user instanceof Group)
- // iwp.openEditor(uei, UserEditor.GROUP_EDITOR_ID);
- // else
- // iwp.openEditor(uei, UserEditor.USER_EDITOR_ID);
- } catch (Exception pie) {
- throw new CmsException("Unable to open UserEditor for " + user, pie);
- }
+ String editorId = getEditorId(user);
+ CmsE4Utils.openEditor(partService, editorId, LdapAttrs.uid.name(), user.getName());