|
Re: The progress item(on the right of statusbar) has no effect when Job is running. [message #453581 is a reply to message #453568] |
Thu, 03 August 2006 15:09 |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
xy wrote:
> The progress item has no effect when Job is running, but has effect when job
> is finished(only a flash).
> I use Display.getDefault().asyncExec(), but the application window is still
> blocked, but the break is workable in Job instance code.
...snip
The runnable that you pass to asyncExec will be executed in the GUI
thread. This means that the display will be unresponsive until the run
method returns. The purpose of asyncExec is to update the display from a
background thread, not to execute a long running process.
I take it you are trying to show the progress while the showBirtReport()
method is running. In this case, it doesn't look like you need to use the
asyncExec call at all.
You have already discovered the Job api, so you are on the right track
there. The showBirtReport() call should be in the run method of a Job.
Your button's widgetSelected method should create and schedule the
ShowBirtJob instead of calling asyncExec with a runnable.
|
|
|
Powered by
FUDForum. Page generated in 0.04195 seconds