Community
Participate
Working Groups
Perhaps Mac specific, I have not tried on other platforms If you are making a change to a boolean trace option on the Mac focus is changed to the input field with a drop down box to select 'true' | 'false'. If you change the boolean value to be different than before but do not click anything other than 'Apply' or 'OK' then the there is no call to org.eclipse.ui.trace.internal.datamodel.ModifiedDebugOptions.addDebugOption(TracingComponentDebugOption) to record the option change. As a result the DebugOptions are not updated successfully with the changed option. On the other hand, if before clicking 'Apply' or 'OK' you change the focus off the input field for the boolean option then the org.eclipse.ui.trace.internal.datamodel.ModifiedDebugOptions.addDebugOption(TracingComponentDebugOption) method is called as expected.
On Windows, the editor value is not applied when the combo is changed. However, when ok or apply is pressed, the value is applied (event sent) and the change recognized. Moving to Platform UI for comment as it looks like we get no call to EditingSupport.setValue(). I can try to confirm on a Mac if needed.
For clarity, to reproduce: 1. Open Window > Preferences > General > Tracing 2. Enable tracing 3. Select some boolean tracing value, click on the value column and use the mouse to select a different value. 4. Click OK. Note that the value field does not lose focus. Interesting problem! On OS X, clicking on the OK or Apply buttons in the Preferences dialog doesn't actually cause a focus change: the button is triggered, but the focus remains on the original widget. This lack of a focus change throws a wrench into how ComboBoxCellEditor propagates cell-editor-change events. The ComboBoxCellEditor sets up several events on its underlying CCombo —- focusLost, widgetDefaultSelected, and some key-presses —- to trigger a editor-value-changed event via the method applyEditorValueAndDeactivate(). It's one of these editor-value-changed listeners that leads to the addDebugOption() being called; it also leads to the cell-editor being deactivated. The code doesn't trigger applyEditorValueAndDeactivate() from the CCombo's widgetSelected() as widgetSelected() is called both on mouse-driven selection (which causes the CCombo's drop-down list to disappear) as well as when using key-arrow-up and key-arrow-down to select between values (which keeps the CCombo's drop-down list visible). So short of a focus-change, we have no other way to know if the user has actually selected a value. I think a fix would be to have the widgetSelected() event check whether the CCombo's drop-down list is still visible via CCombob#getListVisible(). If not, then the user selected a value and applyEditorValueAndDeactivate() can be called. This seems to work well in my testing. It has one side-effect that if the user selects a value from the combo list, the CCombo's text field is no longer shown as being editable as the cell editor is deactivated; this is identical to the behaviour when selecting a value from the combo list with "enter".
Ah, searchig through the bugs, I think this is the same issue as 230398. *** This bug has been marked as a duplicate of bug 230398 ***