Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 290555 | Differences between
and this patch

Collapse All | Expand All

(-)org.eclipse.emf/plugins/org.eclipse.emf.common.ui/src/org/eclipse/emf/common/ui/celleditor/ExtendedComboBoxCellEditor.java (-1 / +7 lines)
Lines 211-221 Link Here
211
  {
211
  {
212
    CCombo combo = (CCombo)getControl();
212
    CCombo combo = (CCombo)getControl();
213
    if (combo != null && (!combo.isDisposed()))
213
    if (combo != null && (!combo.isDisposed()))
214
    {
214
    {
215
      Object previousValue = getValue();
215
      String[] items = createItems(list = new ArrayList<Object>(originalList), labelProvider, filter, sorted);
216
      String[] items = createItems(list = new ArrayList<Object>(originalList), labelProvider, filter, sorted);
216
      combo.setItems(items);
217
      combo.setItems(items);
217
      if (items.length > 0)
218
      // If the previous value is valid, keep it selected
219
      if (list.contains(previousValue))
220
      {
221
        setValue(previousValue);
222
      }
223
      else if (items.length > 0)
218
      {
224
      {
219
        combo.select(0);
225
        combo.select(0);
220
      }
226
      }
221
    }
227
    }

Return to bug 290555