Bug 193394

Summary: [Table] After Deleting the folder shown in Table get an error
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, kmunir
Version: 2.0Keywords: contributed
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Changed mentions of Vector to java.util.List as passed child is an ArrayList not a Vector
mober.at+eclipse: iplog+
Deleting parent of folder shown in table will no longer display error mober.at+eclipse: iplog+

Description Kevin Doyle CLA 2007-06-19 16:26:08 EDT
After deleting the folder that is shown in the Remote System Details view the contents of the view shows: "Folder PATH_TO_FOLDER is not readable.  Cannot Expand".  Instead the view should display the parents contents of the deleted folder or go back to the list of connections.

Steps to Reproduce:
1. Do Show in Table on some folder.
2. Delete that folder.
3. The Remote System Details View is refreshed and displays the message:
"Folder PATH_TO_FOLDER is not readable.  Cannot Expand"

-----------Enter bugs above this line-----------
TM 2.0RC3 Testing
installation : eclipse-SDK-3.3RC4
RSE install  : RSE 2.0 RC3
java.runtime : Sun 1.5.0_11-b03
os.name:     : Windows XP, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-06-28 09:26:03 EDT

*** This bug has been marked as a duplicate of bug 193390 ***
Comment 2 Kevin Doyle CLA 2007-07-09 15:09:39 EDT
Reopening as the reason why this happens is different from that of bug 193390.
Comment 3 Kevin Doyle CLA 2007-07-09 15:11:46 EDT
Created attachment 73369 [details]
Changed mentions of Vector to java.util.List as passed child is an ArrayList not a Vector

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 16:44:26 EDT
I've applied the fix and updated cvs.
Comment 5 Kevin Doyle CLA 2007-07-15 17:49:25 EDT
Reopening.  Doesn't work if you delete the parent of the folder shown in the table.  Also since it uses the history it could take you back to a folder that was deleted.  
Comment 6 Kevin Doyle CLA 2007-07-23 14:21:23 EDT
Created attachment 74382 [details]
Deleting parent of folder shown in table will no longer display error

This patch changes a couple things:

1. Added to SystemTableViewPart.dispose() --- registry.removeSystemRemoteChangeListener(this);
2. Deleting a resource will remove it from the history and deleting multiple resources now works.
3. Added isPartOf(parent, child) to determine if parent is the parent of child.
4. Modified removeFromHistory so it goes through the history and removes all object that match isPartOf(parent, child) and then changes the viewers input if the viewers input has been deleted.

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 7 Kevin Doyle CLA 2007-07-23 14:25:19 EDT
Oops.  isPartOf should be isParentOf.
Comment 8 David McKnight CLA 2007-07-23 15:19:50 EDT
I've committed the updated patch to deal with grandparents and beyond.
Comment 9 Kevin Doyle CLA 2007-07-24 09:34:23 EDT
Verified with I20070724-0735.