Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Very short running jobs inside progress group are not shown appropriately in progress view
Very short running jobs inside progress group are not shown appropriately in progress view [message #491526] Wed, 14 October 2009 21:44 Go to next message
dl is currently offline dlFriend
Messages: 33
Registered: July 2009
Member
Hi,

I suppose that there is a bug when the job running time is very, very short
and the job is set in the progress group. Lets consider that we have 3 jobs
in 1 group. If some of this jobs (lets say 3) has the run(...) method like
as :



@Override

protected IStatus run(IProgressMonitor monitor) {



monitor.beginTask(getName(), 100);



for (int i = 0; i < 100; i++) {



monitor.worked(1);



}



monitor.done();

return Status.OK_STATUS;



}



The final result in progress view will be the following:

Group

ok // job1

ok // job2

ok // job3

Job3 (Finished at ...)

ok // job 3 once again



Note that this is the case when the
setProperty(IProgressConstants.KEEP_PROPERTY, true) is set for jobs.



If I am doing something wrong, please correct me..



Regards,

DL
Re: Very short running jobs inside progress group are not shown appropriately in progress view [message #491530 is a reply to message #491526] Wed, 14 October 2009 21:46 Go to previous messageGo to next message
dl is currently offline dlFriend
Messages: 33
Registered: July 2009
Member
I forgot to say that set some sleep at the beginning of job run method can
help to resolve this problem (in my case 500ms).

"DL" <daniel.ladavac@email.t-com.hr> wrote in message
news:hb5gp0$839$1@build.eclipse.org...
> Hi,
>
> I suppose that there is a bug when the job running time is very, very
> short and the job is set in the progress group. Lets consider that we have
> 3 jobs in 1 group. If some of this jobs (lets say 3) has the run(...)
> method like as :
>
>
>
> @Override
>
> protected IStatus run(IProgressMonitor monitor) {
>
>
>
> monitor.beginTask(getName(), 100);
>
>
>
> for (int i = 0; i < 100; i++) {
>
>
>
> monitor.worked(1);
>
>
>
> }
>
>
>
> monitor.done();
>
> return Status.OK_STATUS;
>
>
>
> }
>
>
>
> The final result in progress view will be the following:
>
> Group
>
> ok // job1
>
> ok // job2
>
> ok // job3
>
> Job3 (Finished at ...)
>
> ok // job 3 once again
>
>
>
> Note that this is the case when the
> setProperty(IProgressConstants.KEEP_PROPERTY, true) is set for jobs.
>
>
>
> If I am doing something wrong, please correct me..
>
>
>
> Regards,
>
> DL
>
>
>
>
Re: Very short running jobs inside progress group are not shown appropriately in progress view [message #491566 is a reply to message #491530] Thu, 15 October 2009 04:43 Go to previous message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
DL wrote:
> I forgot to say that set some sleep at the beginning of job run method can
> help to resolve this problem (in my case 500ms).

Sounds like a bug to me. If you can consistently reproduce this, please
raise a bug with a sample snippet.


- Prakash

Platform UI Team, IBM
http://blog.eclipse-tips.com
Previous Topic:Logging and Tracing?
Next Topic:How to set icon for progress job's group?
Goto Forum:
  


Current Time: Thu Mar 28 23:22:28 GMT 2024

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

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

Back to the top