Thanks for the reply Elias,
I was able to run your snippet but found
that I still don’t get any progress indicated in the status line… I’m currently
running some tests that don’t take as long as my actual, typical long-running
tests, so I was thinking that reading about the delay of SHORT job time before
showing progress might come into play, but even inserting some thread sleeps to
try and provoke it didn’t help.
I did find that if I created my process as
a regular eclipse Job, I could get a progress dialog/popup using the
IProgressService showInDialog() method.
Eg - [inside Handler execute()]
Job job = new Job(){
// run() method implementation
};
IProgressService ps =
PlatformUI.getWorkbench().getProgressService();
ps.showInDialog(HandlerUtil.getActiveShellChecked(event),
job);
job.schedule();
I think that’s going to have to do for now…
Thanks!
T
From:
riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-bounces@xxxxxxxxxxx] On Behalf Of Elias Volanakis
Sent: Thursday, April 30, 2009
1:42 PM
To: Riena Developers list
Subject: Re: [riena-dev] UI Job
with Progress from Handler?
Hi Todd,
I'm not terribly familiar with the UIProgress / UIJob stuff. Hopefully
somebody else from the team can help.
In RCP one way to show progress is this: (assuming a Handler)
public Object execute(ExecutionEvent event) throws ExecutionException {
IRunnableWithProgress
op = new IRunnableWithProgress() {
public
void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
monitor.beginTask("Working",
60);
for
(int i = 60; i > 0; i--) {
if
(monitor.isCanceled()) {
Thread.sleep(500);
// do some work here
IProgressService
ps = PlatformUI.getWorkbench().getProgressService();
IProgressService has a few more methods than could be useful.
On Thu, Apr 30, 2009 at 6:40 AM, Todd Lee <Todd.Lee@xxxxxxxxxx> wrote:
Hi
there,
I’m
trying to run a job from a Handler (extends AbstractHandler) and, while the job
does run without error, I’m not seeing any progress (either statusline or
dialog etc…)
I’ve
tried running it as both a regular eclipse Job and a UIJob, but still no
progress. I see in the UIProcess sample of the example client that the jobs are
run from a view controller and make use of the getNavigatorNode() call to set a
property. Is there someway that I can still get the progress updates without
running from a view controller?
Thanks
Todd
Todd Lee
Member
of Technical Staff
Software
Tools Development
Medical
Division
ON
Semiconductor
todd.lee@xxxxxxxxxx
+1
519 884-9696 ext. 2242
http://onsemi.com
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev
--
Elias Volanakis | Technical Lead | EclipseSource Portland
elias@xxxxxxxxxxxxxxxxx | +1 503
929 5537 | http://eclipsesource.com