Community
Participate
Eclipse IDE
M7 1. open an already translated file with lots of strings in the NLS wizard, e.g. UserLibraryPreferencePage 2. select the first value so that the cell ediotor appears 3. use the scroll bar to scoll so that the (still selected) entry is not visible anymore 4. select a new entry -> the table suddendly scrolls and a different entry than intended gets the selection
Note, this is not regression introduced by the new Eclipse NLS support but a problem of the table since the beginning.
General cell modfier problem. Raising severity to major, very annoying behaviour.
This behavior is caused by the use of TableViewer.refresh(true) in the middle of the cell modification callback. The CellModifier in ExternalizeWizardPage calls validateKeys(true), which will refresh the entire table. This includes restoring the selection in the table after it is refreshed, yet the selection is not properly maintained at this point in the callback. I think the best way to fix this is to avoid the problem. There is no need to refresh the entire table in this callback. Instead, only the item that changed should be updated. Attaching proposed patch.
Created attachment 24390 [details] ExternalizeWizardPage.patch proposed change to ExternalizeWizardPage
Tod - a side question. Why is the CellModifier.modify callback sent even when the value of the cell did not change? Is this intentional? Should clients be checking for a change in value? If so, then the ExternalizeWizardPage could be further optimized so that nothing is done if the value didn't change.
I don't think it is intentional. As long as we don't break API (and made the API more explicit) this should be fine
Opened bug #102906 to track the fact that the cell modify callback is triggered even when the value did not change. Note that the proposed patch is still the suggested fix for this bug, since the strange selection occurs whenever the modify callback is (legitimately) received.
moving to JDT-UI to consider patch for the wizard.
Considering for 3.1.1.
verfied and released patch in jdt.ui HEAD (3.2) > 20050707 suggest as 3.1.1 candidate: simple fix that IMO fixes a really nasty usability problem in the NLS wizard Thanks Susan for the patch!
OK. Approving for 3.1.1. Martin, can you backport it for me ;-) Thanks.
patch released in 3.1.1 stream
reviewed patch - ok.
Verifying...
Verified in M20050804-1200.