lb.addItem("<==" + constants.DeleteItem(), DELETE_VALUE);
for (Map.Entry<String, String> entry : getCompletionsForCurrentType().entrySet()) {
lb.addItem(entry.getKey(), entry.getValue());
}
lb.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
ListBox box = (ListBox) sender;
panel.remove(box);
if (box.getSelectedIndex() > 0) {
onChangeSelection(box.getValue(box.getSelectedIndex()));
}
}
});
return lb;
} else {//if (SuggestionCompletionEngine.TYPE_COLLECTION.equals(getCurrentGenericType())) {
ListBox lb = new ListBox();
lb.setVisibleItemCount(1);
lb.addItem(constants.ChooseDotDotDot(), "");
lb.addItem("<==" + constants.DeleteItem(), DELETE_VALUE);
for (Map.Entry<String, String> entry : getCompletionsForCurrentType().entrySet()) {
lb.addItem(entry.getKey(), entry.getValue());
}
lb.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
ListBox box = (ListBox) sender;
panel.remove(box);
if (box.getSelectedIndex() > 0) {