Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2008-10-29 18:20:27 +0000
committerSusan Franklin2008-10-29 18:20:27 +0000
commit60aed4facdb0d3f30a770e242bf3adce763638b9 (patch)
treeb65679c38a2997b0227c07809bb2d30a0b516d88
parenta2465418f2635b03bb4564e7f2ee9f857b0f47e4 (diff)
downloadrt.equinox.p2-60aed4facdb0d3f30a770e242bf3adce763638b9.tar.gz
rt.equinox.p2-60aed4facdb0d3f30a770e242bf3adce763638b9.tar.xz
rt.equinox.p2-60aed4facdb0d3f30a770e242bf3adce763638b9.zip
Bug 250325 - [ui] UI shows duplicate categories when refreshingR34x_v20081029
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
index d4d5bd5dd..15f6317a5 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
@@ -26,6 +26,8 @@ import org.eclipse.ui.progress.IElementCollector;
*/
public abstract class RemoteQueriedElement extends QueriedElement implements IDeferredWorkbenchAdapter {
+ boolean alreadyCollected = false;
+
protected RemoteQueriedElement() {
super(null);
}
@@ -37,8 +39,10 @@ public abstract class RemoteQueriedElement extends QueriedElement implements IDe
public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) {
try {
Object[] children = fetchChildren(o, monitor);
- if (!monitor.isCanceled()) {
+
+ if (!monitor.isCanceled() && !alreadyCollected) {
collector.add(children, monitor);
+ alreadyCollected = true;
}
} catch (OperationCanceledException e) {
// Nothing to do

Back to the top