list.setSelectionMode(mode);
}
@Override
public LdapStructureAttribute[] getSelectedAttributes() {
IndexedSelection sel = list.getSelection();
if (sel.isEmpty()) {
return new LdapStructureAttribute[0];
}
List<LdapStructureAttribute> attrs = new ArrayList<LdapStructureAttribute>();
for (Object o : sel.items()) {
if (o instanceof LdapStructureAttribute) {
attrs.add((LdapStructureAttribute) o);
}
}
return attrs.toArray(new LdapStructureAttribute[attrs.size()]);