Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Job: Block UI from user but show progress
icon5.gif  Job: Block UI from user but show progress [message #630229] Fri, 01 October 2010 05:16 Go to next message
Martin W is currently offline Martin W
Messages: 7
Registered: July 2009
Junior Member
Hello!

I have a job that will fail if the user changes things in the UI. Therefore I tried UIJob and Thread.join() to block the UI during my job. But both ways have the disadvantage that the UI will be blocked at all. There will be no progress bar and the user will think that the program has crashed. I'm looking for a way to block the UI for all user inputs but nevertheless show a progress bar like a normal job.
Re: Job: Block UI from user but show progress [message #630350 is a reply to message #630229] Fri, 01 October 2010 13:01 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
On 01/10/10 2:46 PM, Martin Winandy wrote:
> Hello!
>
> I have a job that will fail if the user changes things in the UI.
> Therefore I tried UIJob and Thread.join() to block the UI during my job.
> But both ways have the disadvantage that the UI will be blocked at all.
> There will be no progress bar and the user will think that the program
> has crashed. I'm looking for a way to block the UI for all user inputs
> but nevertheless show a progress bar like a normal job.

Did you try ProgressMonitorDialog?

--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: Job: Block UI from user but show progress [message #630595 is a reply to message #630350] Mon, 04 October 2010 06:56 Go to previous messageGo to next message
Martin W is currently offline Martin W
Messages: 7
Registered: July 2009
Junior Member
Prakash G.R. wrote on Fri, 01 October 2010 13:01
Did you try ProgressMonitorDialog?

Yes, I have tried ProgressMonitorDialog. It has the disadvantage that the dialog comes always. Let me explain why this is a problem. The progress dialog of a job will be opened with a delay of a few seconds. So if the job runs less then one second there will be no progress dialog. But with ProgressMonitorDialog and IRunnableWithProgress the progress dialog will be opened always, even if the job takes less than one second. My job will run after a drag 'n' drop operation. Normally my job is faster then one second. In this case it is very disruptive if the progress dialog open and close in the same second. It looks like flashing. But if the amount of data is very big, it can happen that the same job needs a whole minute. In this case I need a progress dialog of course.

I want to have the same behaviour like normal jobs in Eclipse: show the progress dialog with a delay of a few seconds. So the user will see the progress dialog only for long-running jobs. But how can I have this behaviour including blocking the UI to prevent the user from doing any changes.

[Updated on: Mon, 04 October 2010 06:57]

Report message to a moderator

Re: Job: Block UI from user but show progress [message #631798 is a reply to message #630595] Fri, 08 October 2010 15:23 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad Bandaru
Messages: 98
Registered: March 2010
Location: Hyderabad
Member

Try this
http://wiki.eclipse.org/FAQ_Why_should_I_use_the_new_progres s_service%3F


Re: Job: Block UI from user but show progress [message #632000 is a reply to message #631798] Mon, 11 October 2010 03:46 Go to previous message
Martin W is currently offline Martin W
Messages: 7
Registered: July 2009
Junior Member
Perfect! Thanks very much, this is the solution Smile
Previous Topic:window workbench icon still missing
Next Topic:Starting RCP App from Network Drive
Goto Forum:
  


Current Time: Thu Aug 21 18:19:51 EDT 2014

Powered by FUDForum. Page generated in 0.01846 seconds