Community
Participate
Working Groups
CCombo combo = (CCombo)getControl();
if (combo != null && (!combo.isDisposed()))
{
String[] items = createItems(list = new ArrayList<Object>(originalList), labelProvider, filter, sorted);
ArrayList<Object> newList = new ArrayList<Object>(originalList);
combo.setItems(items);
String[] items = createItems(newList, labelProvider, filter, sorted);
if (items.length > 0)
if (!newList.equals(list))
combo.select(0);
final Object previousValue = getValue();
list = newList;
if (list.contains(previousValue))
// Set it immediately and set it again later because something insists on changing the selection again.
setValue(previousValue);
combo.getDisplay().asyncExec
(new Runnable()
public void run()
}
});
int index = list.indexOf(value);
if (index != -1)
super.doSetValue(list.indexOf(value));
super.doSetValue(index);