Bug 195543

Summary: [Scratchpad] Double Clicking on a folder expands wrong folder if shown twice in view
Product: [Tools] Target Management Reporter: Kevin Doyle <kjdoyle>
Component: RSEAssignee: Kevin Doyle <kjdoyle>
Status: CLOSED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: minor    
Priority: P3 CC: dmcknigh
Version: 2.0Keywords: contributed
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 195537    
Bug Blocks:    
Attachments:
Description Flags
Double Clicking is based on TreePath's so proper element is expanded mober.at+eclipse: iplog+

Description Kevin Doyle CLA 2007-07-05 11:35:52 EDT
If you have the same expandable element shown twice in the Remote Scratchpad then double clicking on one will expand the other.

Steps to Reproduce:
1. Find some folder that has a folder inside it.
2. Drag and Drop the folder into the Remote Scratchpad.  Expand it in the Scratchpad.
3. Drag and Drop a folder inside that folder into the Remote Scratchpad.
4. Double click on the last folder in the Scratchpad.  It will expand the other folder with the same name as it.

-----------Enter bugs above this line-----------
TM 2.0 Testing
installation : eclipse-SDK-3.3
RSE install  : RSE 2.0
java.runtime : Sun 1.5.0_11-b03
os.name:     : Windows XP, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-07-06 07:46:39 EDT
Kevin I think you have most experience with this - can you come up with a patch?
Comment 2 Kevin Doyle CLA 2007-07-06 10:22:16 EDT
I have a patch for this, but it depends on the SystemScratchpadView using the hashmap and the ElementComparer that is in SystemView (bug #195537).  I'll post the patch shortly, but until that change is made it will work the same way it does now, as it can't distinguish between duplicate elements.
Comment 3 Kevin Doyle CLA 2007-07-09 09:32:39 EDT
Created attachment 73316 [details]
Double Clicking is based on TreePath's so proper element is expanded

Legal Message: I, Kevin Doyle, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 4 David McKnight CLA 2007-07-09 14:21:11 EDT
I've committed the fix to cvs.  Thanks.
Comment 5 Martin Oberhuber CLA 2007-07-10 07:10:42 EDT
Adding contributed kwd
Comment 6 Kevin Doyle CLA 2007-07-15 16:05:15 EDT
Verified with I20070713-0605.