]>
git.argeo.org Git - gpl/argeo-slc.git/blob - ArgeoUserEditorInput.java
c70ef9c6869e567d4ab6729ea1291c3bb0463a5f
1 package org
.argeo
.cms
.ui
.workbench
.internal
.useradmin
.parts
;
3 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
4 import org
.eclipse
.ui
.IEditorInput
;
5 import org
.eclipse
.ui
.IPersistableElement
;
7 /** Editor input for an Argeo user. */
8 public class ArgeoUserEditorInput
implements IEditorInput
{
9 private final String username
;
11 public ArgeoUserEditorInput(String username
) {
12 this.username
= username
;
15 @SuppressWarnings("unchecked")
16 public Object
getAdapter(@SuppressWarnings("rawtypes") Class adapter
) {
20 public boolean exists() {
21 return username
!= null;
24 public ImageDescriptor
getImageDescriptor() {
28 public String
getName() {
29 return username
!= null ? username
: "<new user>";
32 public IPersistableElement
getPersistable() {
36 public String
getToolTipText() {
37 return username
!= null ? username
: "<new user>";
40 public boolean equals(Object obj
) {
41 if (!(obj
instanceof ArgeoUserEditorInput
))
43 if (((ArgeoUserEditorInput
) obj
).getUsername() == null)
45 return ((ArgeoUserEditorInput
) obj
).getUsername().equals(username
);
48 public String
getUsername() {