no visible progress-monitor with IWorkbenchSiteProgressService? [message #333091] |
Tue, 25 November 2008 15:26  |
Eclipse User |
|
|
|
WinXP; R3.4.1
In our RCP, I have a part (View) within which I launch a Job
"computeJob", during which I would like some sort of progress indication.
(Note: in order for the part's UI to be useful, the job must complete;
the "computeJob" does non-UI computation and then refreshes the UI --
using an asyncExec() -- to show the results).
a) schedule()'ing the job causes it to run, all fine, but the
progress-monitor that is supplied to run() is the NullProgressMonitor,
so no progress-indication is displayed.
b) attempting to use as follows (as recommended by the Help) shows the
busy-while cursor, all fine, but still no progress-monitor:
<code>
IWorkbenchSiteProgressService siteService =
(IWorkbenchSiteProgressService) getSite().getAdapter(
IWorkbenchSiteProgressService.class);
siteService.schedule(computeJob, 100, true);
</code>
====
So how do I do that?
thanks,
Paul
|
|
|
|
Re: no visible progress-monitor with IWorkbenchSiteProgressService? [message #333291 is a reply to message #333099] |
Wed, 03 December 2008 14:24  |
Eclipse User |
|
|
|
Gilbert Mirenque wrote:
> If you call setUser(true) befor scheduling it, it will be run as a
> user-initiated job. By that the normal ProgressMonitor, which you know
> from other standard Eclipse-jobs, will be shown.
Right, I had forgotten about setUser(); thanks. However, in an RCP, it
doesn't seem to make any difference. ...
-Paul
|
|
|
Powered by
FUDForum. Page generated in 0.03145 seconds