Community
Participate
Working Groups
Ok, All code is in the org.eclipse.ui.views. We have some properties in a PropertySheetViewer. It is possible to edit the values. Using the mouse click to move out of a cell after editing works fine. There is a problem however with the following series of actions... 1. Click on a cell 2. Edit the cell's values 3. Press enter At this stage the following has occured.. CellEditor::run ICellEditorListener::applyEditorValue PropertySheetEntry::applyEditorValue - This applies the new value Now we click on a different cell - MouseDown event PropertySheetViewer::hookControl - see comment in code "// Part2: handle single click activation of cell editor" PropertySheetViewer::handleSelect In PropertySheetViewer::handleSelect, the first couple of lines are if (cellEditor != null) { applyEditorValue(); deactivateCellEditor(); } And guess what ? The cellEditor has not been disposed of. It is disposed when using the mouse clicking mechanism (ie after editing cell immediately click on another cell, as opposed to enter key). So the applyEditorValue is done twice. Proposed fix is.... In PropertySheetViewer::hookControl Add the following... //when we move off the cell via the enter key the changes will have been applied //we now need to clean up the editor, so we dont apply the changes twice tree.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (e.character == SWT.CR) { deactivateCellEditor(); } } }); I will attempt to commit (submit for review) this code, but it's my first attempt at changing the eclipse source.... Marcus.
Thanks Marcus, I'll be glad to review (and appreciate) any patch you might supply. If applied it also gets you an 'attribution' in the eclipse source...;-).
I found the bug also. It always apply value twice every time. It just reproduces on eclipse 3.4.
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.