| Summary: | [JFace] improve ComboBoxCellEditor | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Burkhard Losch <burkhard.losch> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | remy.suen |
| Version: | 3.6.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag. |
Build Identifier: M20110210-1200 In the the current implementation of ComboBoxCellEditor it is not possible to get a valid result value (> -1), if you type in a selection with the keyboard rather than to select it from the list with the mouse Reproducible: Always Steps to Reproduce: Make a table with a ComboBoxCellEditor, give it an item list new String[] {"yes", "no"} Type in "yes" or "no" if you edit the table The setValue method of the EditingSupport retrieves -1 and not 0 or 1 as expected. If you choose it from the list, than the result is as expected. To overcome this problem, the method applyEditorValueAndDeactivate() in ComboBoxCellEditor should be modified slightly: replace the first line: selection = comboBox.getSelectionIndex(); with selection = comboBox.getSelectionIndex(); if (selection == -1) { String t = comboBox.getText(); selection = comboBox.indexOf(t); }