Project: Eclipse_Platform_UI
Bug 60462 [CellEditors] applyEditorValueAndDeactivate() in ComboBoxCellEditor gets index exception.
Reported: 2004-04-29 13:02:52 | Status: verified fixed

The problem is in this method. See line marked with "@ERROR" below. private void applyEditorValueAndDeactivate() { selection = comboBox.getSelectionIndex(); Object newValue = doGetValue(); markDirty(); boolean isValid = isCorrect(newValue); setValueValid(isValid); if (!isValid) { //@ERROR //THIS LINE CAUSES AN ERROR. IT ASSUMES SOMETHING IS SELECTED. IN EDIT //MODE, THIS IS NOT TRUE IF I JUST TYPE SOMETHING INTO THE CELL EDITOR. //IN THIS CASE, selection IS AN INVALID INDEX. setErrorMessage( MessageFormat.format(getErrorMessage(), new Object[] {items[selection]})); } fireApplyEditorValue(); deactivate(); }

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboBoxCellEditor.java