| Summary: | WizardDialog.run does not run in user context | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Markus Krüger <webmaster> | ||||
| Component: | JFace | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 1.5 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Markus, did you try to execute the WizardDialog.run with fork == false? Based on WizardDialog#run method JavaDoc, in order to execute the runnable in the UI thread you have to specify fork == false. Otherwise you have to ensure the correct context yourself as you pointed out - "Calling UICallback.runFake...() and request the locale inside of this runnable will return the right locale". fork == false works as expected. So it is a wanted behavior that these background threads are not called with user context? Is there a reason for this? I can not imagine a case where this might not be needed... (In reply to comment #2) > fork == false works as expected. > So it is a wanted behavior that these background threads are not called with > user context? Is there a reason for this? I can not imagine a case where this > might not be needed... This is an original JFace code and it is designed to behave that way. Running into the UI thread (fork = false) has the user context, running into the background thread (fork = true) you have to provide a context if needed. I don't want to changed it if it's not really necessary. I will close this bug as INVALID. Please reopen if you disagree. |
Created attachment 222138 [details] A test app. Using getContainer().run(...) in a performFinish method of a wizard not runs the runnable in user context. You can see it, if you start the test app with "-nl" set to a language your browser is not using. This way, you will get the locale of the browser outside of the runnable and inside you will get the default locale set with "-nl". Calling UICallback.runFake...() and request the locale inside of this runnable will return the right locale. So i think, that getContainer().run(...) needs to run with user context.