Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » ProgressIndicator Problem
ProgressIndicator Problem [message #128917] Mon, 20 April 2009 10:43 Go to next message
Eclipse UserFriend
Hi,

I have a background Job that is created using a
IWorkbenchSiteProgressService for a view. When the job is run, it shows
the running animation and job name in the ProgressIndicator. When it
completes, the animation goes away and the text remains, sometimes showing
100%, sometimes showing a different percentage. It appears as though it's
not completing a final update of some sort.

Does anyone have a workaround or some other suggestion?

An example snippet is as follows:

IWorkbenchSiteProgressService ps = (IWorkbenchSiteProgressService)
getViewSite()
.getAdapter(IWorkbenchSiteProgressService.class);
Job job = new Job("Retrieving info from server") {
protected IStatus run(IProgressMonitor monitor) {
monitor.beginTask("Retrieving records", 100);

for (int i = 0; i < 100; i++)
monitor.worked(1);
try {
// Simulate work being done
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}

monitor.done();
return Status.OK_STATUS;
}
};
ps.schedule(job, 0, true);

Thanks,
Vaughn
Re: ProgressIndicator Problem [message #129126 is a reply to message #128917] Tue, 21 April 2009 07:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi Vaughn,

this sounds like a bug to me. Could you open up a bug report and include
your snippet and maybe a screenshot of the remaining text?

http://wiki.eclipse.org/RAP_Bug_Reporting_Howto

Thanks, Ralf

> I have a background Job that is created using a
> IWorkbenchSiteProgressService for a view. When the job is run, it shows
> the running animation and job name in the ProgressIndicator. When it
> completes, the animation goes away and the text remains, sometimes
> showing 100%, sometimes showing a different percentage. It appears as
> though it's not completing a final update of some sort.
>
> Does anyone have a workaround or some other suggestion?
>
> An example snippet is as follows:
>
> IWorkbenchSiteProgressService ps = (IWorkbenchSiteProgressService)
> getViewSite()
> .getAdapter(IWorkbenchSiteProgressService.class);
> Job job = new Job("Retrieving info from server") {
> protected IStatus run(IProgressMonitor monitor) {
> monitor.beginTask("Retrieving records", 100);
> for (int i = 0; i < 100; i++)
> monitor.worked(1);
> try {
> // Simulate work being done
> Thread.sleep(500);
> } catch (InterruptedException e) {
> e.printStackTrace();
> }
> }
>
> monitor.done();
> return Status.OK_STATUS;
> }
> };
> ps.schedule(job, 0, true);
>
> Thanks,
> Vaughn
>
Re: ProgressIndicator Problem [message #129374 is a reply to message #129126] Wed, 22 April 2009 08:46 Go to previous message
Eclipse UserFriend
Done - Bug 273243 created
Previous Topic:Anyone at JAX
Next Topic:Text widget and native browser Copy/Paste menu
Goto Forum:
  


Current Time: Fri Jul 04 19:46:12 EDT 2025

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

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

Back to the top