Community
Participate
Working Groups
Remote scratchpad allows adding same object more than once. When you add a file two times, then try to delete that file selecting it from the scratchpad tries to delete all (in this case two) links. However, I think it deletes the file at first attempt and for second, it gives an error saying there is no such file. And when you try to remove link from remote scratchpad view, it is not possible to remove it by clicking X (Remove Selected From View) at the corner once. You have to click it twice. -----------Enter bugs above this line----------- RSE 1.0 Testing round 2 installation : eclipse-platform-3.2.1, cdt-3.1.1 RSE install : update-site RSE-complete java.runtime : Sun 1.5.0_08-b03 os.name: : Windows XP 5.1, Service Pack 2 ------------------------------------------------ systemtype : Unix-ssh (dstore-processes) targetos : Fedora Core release 5 (Bordeaux) targetuname : Linux fedai 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST 2006 i686 i686 i386 GNU/Linux targetvm : gij (GNU libgcj) version 4.1.0 20060304 (Red Hat 4.1.0-3) ------------------------------------------------
I tried to follow the bug description and don't see the same error. If you copy the same file twice into the scratchpad and Delete the file by right clicking on the file in the remote systems view or the scratchpad the 2 files stay in the scratchpad. If you click on one of them in the scratchpad and click the "Remove Selected File From View" button it will remove the one file and change the other to act like a directory (i.e. it has the directory icon and the + symbol). You can remove it though without error. It would be nice if you delete a file it's removed from the scratchpad as well.
Created attachment 68664 [details] Added a check when adding items to the scratchpad to see if they already exist. 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.
Thanks Kevin. I'm ok with applying this patch, but given that Scratchpad should be able to contain anything, is it ok to not allow the same object from being added twice to the view? Is everyone ok with this change?
What would the semantics of adding exactly the same object twice be? What would it be good for? IMHO the scratchpad is a container of things, with the semantics of a set so it cannot contain exactly the same thing twice so I'm fine with the patch.
The Scratchpad view allows the same object (i.e. two objects satisfying o==e or o.equals(e)) to be added more than once as a top level node in the view. With this fix we no longer allow this.
[target cleanup] 2.0 RC1 was the original target milestone for this bug