Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Very fast Job leaves behind two entries in progress viewer
Very fast Job leaves behind two entries in progress viewer [message #328324] Wed, 21 May 2008 15:18 Go to next message
Joerg Bullmann is currently offline Joerg BullmannFriend
Messages: 6
Registered: July 2009
Junior Member
Hi there,

I have a curious problem here using Eclipse Jobs for background data
processing. If I have a job that finishes very very quickly (before I can
even see the modal progress/cancel dialog) and I set the Job's
IProgressConstants.KEEP_PROPERTY to true, then I end up with two (yes,
TWO) entries in the standard eclipse progress viewer. There should be only
one, though.

Having added a Thread.wait(500) at the beginning of my run() method, I see
the problem going away.

Have consulted this:
http://www.eclipse.org/articles/Article-Concurrency/jobs-api .html -- what
might I be missing?

Cheers,
Joerg
Re: Very fast Job leaves behind two entries in progress viewer [message #328421 is a reply to message #328324] Sat, 24 May 2008 10:57 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Hi Joerg,

i have the same problem. I dont know either whats going on. I call
job.schedule() only once but I get two popup progress views. (Thank god one
covers the other..) But it feels fishy somehow..

Felix
Re: Very fast Job leaves behind two entries in progress viewer [message #328423 is a reply to message #328421] Sat, 24 May 2008 11:10 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Felix Dorner wrote:
> Hi Joerg,
>
> i have the same problem. I dont know either whats going on. I call
> job.schedule() only once but I get two popup progress views. (Thank god
> one covers the other..) But it feels fishy somehow..

Ha! I tried one last thing. In the my custom job constructor I removed
(setUser(true));

Now I only get one popup progress,cool. Maybe someone knows what was going on?

Felix
Re: Very fast Job leaves behind two entries in progress viewer [message #328485 is a reply to message #328423] Mon, 26 May 2008 13:44 Go to previous message
Joerg Bullmann is currently offline Joerg BullmannFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Felix and all,

Solved my problem. It was -- as in so many cases -- my fault.

From my Job object's run method I was (wrongly) returning a
Status.CANCEL_STATUS as a result of an internal error condition of my
business logic. So I guess Eclipse got confused because the user had not
cancelled the Job.

Have since changed it to return an object of my own status class
(implementing IStatus) and it now works just fine.

Cheers,
Joerg
Previous Topic:Compare Example
Next Topic:Platform configuration has been modified outside this program???
Goto Forum:
  


Current Time: Sat Nov 02 17:13:47 GMT 2024

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

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

Back to the top