Bug 112881 - [Progress] IProgressConstants.KEEPONE_PROPERTY is forced to use poor implementation of belongsTo
Summary: [Progress] IProgressConstants.KEEPONE_PROPERTY is forced to use poor implemen...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, greatbug
Depends on:
Blocks:
 
Reported: 2005-10-17 18:14 EDT by Richard Kulp CLA
Modified: 2019-09-06 16:08 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Kulp CLA 2005-10-17 18:14:10 EDT
The problem is that it says that if another job of the same family starts, the
previous job should be removed. However it looks like the test for this is
incorrect.

In FinishedJobs.findJobsToRemove(JobTreeElement info) it uses this test:

  if (job != null && job != myJob
      && job.belongsTo(myJob)) {

The problem is that belongsTo is supposed to be passed a family. "myJob" is not
a family, it is a Job. The definition of belongsTo doesn't state that you can
pass a Job in. Or that it must understand a Job in addition to a family.

I can see the problem though. There is no way to query what family a job is in,
so there is no way to ask if two jobs are in the same family.

The only way this can work is if the KEEPONE property says the belongsTo method
must be able to understand a Job too, not just a family.
Comment 1 Tod Creasey CLA 2006-04-20 20:07:34 EDT
*** Bug 130297 has been marked as a duplicate of this bug. ***
Comment 2 Tod Creasey CLA 2006-04-21 12:24:24 EDT
A better implementation on our side would have been to have the KEEP_ONE properties value be the family we are looking for rather than have a boolean for enablement. That way your belongsTo would have had a much more consistant implementation.

Unfortuneately this is an API change and we are past the API freeze but we should consider this for a later release.

This doesn't block Bug 130297 so I will remove the dependancy
Comment 3 Kevin Bracey CLA 2007-10-17 12:43:25 EDT
I concur with the belongsTo weirdness - it was clear from the docs that something screwy was up, and I had to check the source to figure out what it was doing with belongsTo.

But on top of that, the test "job != myJob" also messes it up. If a particular instance of a Job is scheduled for a second time, and the job has the KEEPONE_PROPERTY set, the earlier run of that Job should surely be removed. But it isn't.

Comment 4 Susan McCourt CLA 2009-07-09 19:37:12 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 5 Eclipse Webmaster CLA 2019-09-06 16:08:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.