Progress Monitor freezes when app loses focus [message #501099] |
Tue, 01 December 2009 03:04 |
Rollie Messages: 5 Registered: December 2009 |
Junior Member |
|
|
I am trying to use a progress monitor in an RCP application. I have a menu action that is invoke from the menubar and in the action's run() method, creates a wizard dialog and calls the dialog's .open() method. In the performFinish() method of the dialog, I am creating an IRunnableWithProgress object and invoking it with a getContainer(false, false, operation) method call, where the operation is the IRunnableWithProgress. Everything works fine with the progress bar, but if I click on another application, and then click back on the RCP application, the RCP app and wizard dialog both report "Not Responding", and the progress bar stops showing progress. As soon as the operation completes, the dialog disappears, and the app begins responding. I have tried different variations of Jobs, display.async, etc. and nothing seems to make a difference in the behavior. If I do not click on another application, the progress monitor shows progress updates until the operation is complete. It only freezes when I click on anything outside of the RCP app.
|
|
|
Re: Progress Monitor freezes when app loses focus [message #501107 is a reply to message #501099] |
Tue, 01 December 2009 04:39 |
Prakash G.R. Messages: 621 Registered: July 2009 |
Senior Member |
|
|
Rollie wrote:
> I am trying to use a progress monitor in an RCP application. I have a
> menu action that is invoke from the menubar and in the action's run()
> method, creates a wizard dialog and calls the dialog's .open() method.
> In the performFinish() method of the dialog, I am creating an
> IRunnableWithProgress object and invoking it with a getContainer(false,
> false, operation) method call, where the operation is the
> IRunnableWithProgress. Everything works fine with the progress bar, but
> if I click on another application, and then click back on the RCP
> application, the RCP app and wizard dialog both report "Not Responding",
> and the progress bar stops showing progress. As soon as the operation
> completes, the dialog disappears, and the app begins responding. I have
> tried different variations of Jobs, display.async, etc. and nothing
> seems to make a difference in the behavior. If I do not click on
> another application, the progress monitor shows progress updates until
> the operation is complete. It only freezes when I click on anything
> outside of the RCP app.
> IRunnableWithProgress object and invoking it with a
> getContainer(false, false, operation) method call,
When you say false for the first argument, the operation is run on the
same thread as the invoking thread. You are probably invoking it in the
UI thread, which results in the UI freeze
- Prakash Platform UI Team, IBM
Blog <http://blog.eclipse-tips.com>
Twitter <http://www.twitter.com/Eclipse_Tips>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02600 seconds