Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Progress Monitor freezes when app loses focus
Progress Monitor freezes when app loses focus [message #501099] Tue, 01 December 2009 03:04 Go to next message
Rollie  is currently offline 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 Go to previous messageGo to next message
Prakash G.R. is currently offline 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>
Re: Progress Monitor freezes when app loses focus [message #501112 is a reply to message #501107] Tue, 01 December 2009 05:22 Go to previous message
Rollie  is currently offline Rollie
Messages: 5
Registered: December 2009
Junior Member
Thanks for the response Prakash. I had tried passing true for the fork before, but I did not the wizard did not work. After your reply, I tried it again and found that an exception was being thrown that was being caught and discarded which showed that I was trying to access some wizard methods during the runnable. I pulled those calls out into final variables before the runnable, and now the progress bar is working as desired. Thanks again.
Previous Topic:Show Popupmenu
Next Topic:How to communicate between various views/models
Goto Forum:
  


Current Time: Fri Oct 24 18:04:16 GMT 2014

Powered by FUDForum. Page generated in 0.02979 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software