1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-15 13:05:22 +02:00

[241744] Refresh collapse low level nodes which is expended before.

This commit is contained in:
David McKnight 2008-10-02 19:29:30 +00:00
parent 2a7a61e020
commit 0454c84448

View file

@ -63,6 +63,7 @@
* David McKnight (IBM) - [241722] New -> File doesn't select the newly created file
* David McKnight (IBM) - [187739] [refresh] Sub Directories are collapsed when Parent Directory is Refreshed on Remote Systems
* David Dykstal (IBM) - [233530] Not Prompted on Promptable Filters after using once by double click
* David McKnight (IBM) - [241744] Refresh collapse low level nodes which is expended before.
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@ -3788,7 +3789,27 @@ public class SystemView extends SafeTreeViewer
if (debug) System.out.println("Re-Expanded RemoteItem: " + itemToExpand.remoteName); //$NON-NLS-1$
} else if (debug) System.out.println("Re-Expand of RemoteItem '" + itemToExpand.remoteName + "' failed. Not found"); //$NON-NLS-1$ //$NON-NLS-2$
} else if (itemToExpand.data!=null) {
setExpandedState(itemToExpand.data, true);
ExpandedItem nextItemToExpand = null;
if (idx + 1< expandedChildren.size()){
nextItemToExpand = (ExpandedItem)expandedChildren.get(idx + 1);
}
// this is to address bug 241744
if (nextItemToExpand != null && nextItemToExpand.isRemote()){ // if the next item to expand is remote
List remainingExpandedChildren = new ArrayList(expandedChildren.size() - idx);
for (int e = idx + 1; e < expandedChildren.size(); e++){
remainingExpandedChildren.add(expandedChildren.get(e));
}
Item item = findFirstRemoteItemReference(itemToExpand.remoteName, itemToExpand.subsystem, itemToExpand.parentItem);
if (item != null){
IRSECallback callback = new ExpandRemoteObjects(remainingExpandedChildren);
createChildren(item, callback);
((TreeItem) item).setExpanded(true);
}
}
else { // original approach
setExpandedState(itemToExpand.data, true);
}
if (debug) System.out.println("Re-Expanded non-remote Item: " + itemToExpand.data); //$NON-NLS-1$
}
}