Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » ProgressIndicator Problem
ProgressIndicator Problem [message #128917] Mon, 20 April 2009 14:43 Go to next message
Vaughn  is currently offline Vaughn Friend
Messages: 4
Registered: July 2009
Junior Member
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 11:06 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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 12:46 Go to previous message
Vaughn  is currently offline Vaughn Friend
Messages: 4
Registered: July 2009
Junior Member
Done - Bug 273243 created
Previous Topic:Anyone at JAX
Next Topic:Text widget and native browser Copy/Paste menu
Goto Forum:
  


Current Time: Thu Apr 18 17:23:26 GMT 2024

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

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

Back to the top