Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-05-03 15:24:24 +0000
committerMichael Valenta2005-05-03 15:24:24 +0000
commit369504e0a158a2c9d78c56c5eee876a95b4fcf91 (patch)
tree9eaec25c75f24c3bc91ecac08cb7a11e53cb28b4
parent7e44e86d3b97ea0ba67f7f764a77be2dd12ead1b (diff)
downloadeclipse.platform.team-369504e0a158a2c9d78c56c5eee876a95b4fcf91.tar.gz
eclipse.platform.team-369504e0a158a2c9d78c56c5eee876a95b4fcf91.tar.xz
eclipse.platform.team-369504e0a158a2c9d78c56c5eee876a95b4fcf91.zip
Bug 92307 Override and Update collapses parent node
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
index 83b472d14..fe99ef879 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
@@ -375,14 +375,20 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
* after validating that the viewer is still valid.
*/
protected IResource[] getExpandedResources() {
- IResource[] resourcesToExpand = getCachedResources(P_VIEWER_EXPANSION_STATE);
- if (resourcesToExpand.length > 0) {
- // There is still saved state for the expanded resources so use it
- return resourcesToExpand;
+ Set expanded = new HashSet();
+ IResource[] savedExpansionState = getCachedResources(P_VIEWER_EXPANSION_STATE);
+ for (int i = 0; i < savedExpansionState.length; i++) {
+ IResource resource = savedExpansionState[i];
+ expanded.add(resource);
}
StructuredViewer viewer = getViewer();
Object[] objects = ((AbstractTreeViewer) viewer).getVisibleExpandedElements();
- return getResources(objects);
+ IResource[] currentExpansionState = getResources(objects);
+ for (int i = 0; i < currentExpansionState.length; i++) {
+ IResource resource = currentExpansionState[i];
+ expanded.add(resource);
+ }
+ return (IResource[]) expanded.toArray(new IResource[expanded.size()]);
}
/*

Back to the top