Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsVery short running jobs inside progress group are not shown appropriately in progress view
https://www.eclipse.org/forums/index.php/mv/msg/155984/491526/#msg_491526
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]]>dl2009-10-14T21:44:56-00:00Re: Very short running jobs inside progress group are not shown appropriately in progress view
https://www.eclipse.org/forums/index.php/mv/msg/155984/491530/#msg_491530
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
>
>
>
>]]>dl2009-10-14T21:46:41-00:00Re: Very short running jobs inside progress group are not shown appropriately in progress view
https://www.eclipse.org/forums/index.php/mv/msg/155984/491566/#msg_491566
> 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.