| Summary: | [preferences] "Show whitespace characters" gets toggled when "whitespace characters" dialog is opened | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Mark McLoughlin <markmc> | ||||||||
| Component: | Text | Assignee: | Deepak Azad <deepakazad> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | daniel_megert, deepakazad, lshanmug | ||||||||
| Version: | 3.7 | Flags: | daniel_megert:
review+
|
||||||||
| Target Milestone: | 3.7 M5 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Mark McLoughlin
I can reproduce on Linux, though it works fine on Windows. I will take a look. Created attachment 187171 [details]
fix
The focus listener was behaving differently on windows and linux. However, it was not really needed.
The real problem was that there are 2 selection listeners - one is used to open a dialog and one is used to set linkSelected[0] to true. Opening a dialog takes some time and it delays the second selection listener. I have changed the order in which the selection listeners are added so that linkSelected[0] is set to true before the mouseUp event.
Dani, if it looks ok to you please commit the patch. Lakshmi, thanks for the help! > I have changed the order
> in which the selection listeners are added so that linkSelected[0] is set to
> true before the mouseUp event.
This is not a real fix as the order in which the added listeners are notified isn't guaranteed via API.
Created attachment 187260 [details]
fix
Alright, in this patch I have removed the focus listener and then open the dialog in a job.
(Another option would be to open a bug with SWT - focus listener behaves one way on Windows and another way on Linux.)
(In reply to comment #5) > Created attachment 187260 [details] [diff] > fix > > Alright, in this patch I have removed the focus listener and then open the > dialog in a job. > > (Another option would be to open a bug with SWT - focus listener behaves one > way on Windows and another way on Linux.) Using a job here is overkill (really ;-). Just make sure your listeners are notified in the sequence you need (similar to your previous fix). Created attachment 187263 [details]
fix
This one should be good.
Patch is almost fine except for the useless 'widgetDefaultSelected' method. I've removed that and committed it to HEAD. Please make sure to - verify the fix on Linux - check JDT and Text for similar pattern and provide a patch here (for Text) Fixed in OptionsConfigurationBlock as well, and verified on Linux. Thanks Deepak, it's great to see the bug report handled quickly! |