Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-04-28 15:24:54 +0000
committerMichael Valenta2005-04-28 15:24:54 +0000
commitd4fed773378005085504cc1ed50621310e180898 (patch)
tree98496d413604ff155d85dc3887dc6acf91cc18c1
parentb48b919f18b4b743e8a5fccc2716f74c997fa311 (diff)
downloadeclipse.platform.team-d4fed773378005085504cc1ed50621310e180898.tar.gz
eclipse.platform.team-d4fed773378005085504cc1ed50621310e180898.tar.xz
eclipse.platform.team-d4fed773378005085504cc1ed50621310e180898.zip
Bug 93083 New change set appeared twice in synchronize view
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java6
2 files changed, 4 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 8b487ef9f..83b472d14 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
@@ -345,8 +345,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
// Only refresh the model root bu also ensure that
// the parents of the model root and the model root
// itself are added to the view
- ((AbstractTreeViewer)viewer).add(getModelRoot().getParent(), getModelRoot());
- viewer.refresh(getModelRoot());
+ addToViewer(getModelRoot());
}
// restore expansion state
if (isRootProvider())
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java
index 07161c8b8..1784a430c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java
@@ -596,7 +596,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
if (DEBUG) {
System.out.println("Adding child view items of " + parent.getName()); //$NON-NLS-1$
}
- List toAdd = (List)additionsMap.get(parent);
+ Set toAdd = (Set)additionsMap.get(parent);
((AbstractTreeViewer)viewer).add(parent, toAdd.toArray(new Object[toAdd.size()]));
}
additionsMap = null;
@@ -741,9 +741,9 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
if (DEBUG) {
System.out.println("Queueing view item for addition " + element.getName()); //$NON-NLS-1$
}
- List toAdd = (List)additionsMap.get(parent);
+ Set toAdd = (Set)additionsMap.get(parent);
if (toAdd == null) {
- toAdd = new ArrayList();
+ toAdd = new HashSet();
additionsMap.put(parent, toAdd);
}
toAdd.add(element);

Back to the top