Bug 27700 - Ant View: I can activate a target more than once
Summary: Ant View: I can activate a target more than once
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2002-12-04 15:53 EST by Darin Wright CLA
Modified: 2002-12-06 09:23 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2002-12-04 15:53:57 EST
I can repeatedly activate the same target, and it appears multiple times in the 
active targets list. Should only be able to activate a target once.
Comment 1 Jared Burns CLA 2002-12-04 15:59:47 EST
Not a bug. Can you think of any reason to disallow this feature?
Comment 2 Darin Wright CLA 2002-12-04 16:08:31 EST
The list does not manage the entries properly, as each entry is equal. When I 
remove an entry, it removes the wrong one. When I move an entry, it moves the 
wrong one...(try adding a bunch of the same, with a couple that are not the 
same - you'll see what I mean).
Comment 3 Darin Wright CLA 2002-12-04 16:09:17 EST
See previous comment... if you're going to allow it, you'll have to manage them 
properly.
Comment 4 Darin Swanson CLA 2002-12-04 16:09:46 EST
Need to handle this case. You can specify the same target multiple times from 
the cmd line.
Comment 5 Jared Burns CLA 2002-12-04 17:18:00 EST
Fixed. The problem was that I was using List.indexOf(Object) calls to access
the targets to manipulate. Naturally, this resulted in the first item in the
list being returned.

I've changed the implementation to be index-based in the tree so that the
correct tree elements are moved/removed.

Please verify.
Comment 6 Darin Wright CLA 2002-12-06 09:23:53 EST
Verified.