Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2015-05-20 02:54:24 -0400
committerMarkus Schorn2015-05-20 02:54:24 -0400
commite6c886c1ff729e4e5530f1a62f7299c78c7c5095 (patch)
tree73ebaed4469d54904fe8f7b0268559c9ede7348d
parentc4e7d4729116850e599eb37461b48f54dd2ea674 (diff)
downloadorg.eclipse.tcf-e6c886c1ff729e4e5530f1a62f7299c78c7c5095.tar.gz
org.eclipse.tcf-e6c886c1ff729e4e5530f1a62f7299c78c7c5095.tar.xz
org.eclipse.tcf-e6c886c1ff729e4e5530f1a62f7299c78c7c5095.zip
Bug 467647: Show on connect does not work on a Linux host
Change-Id: I00e2c76a0dc850a683bb366bbd630e2a2dab2ab1 Signed-off-by: Markus Schorn <markus.schorn@windriver.com>
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java
index 9c5ef7536..95688de2c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java
@@ -9,8 +9,10 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.filesystem.ui.controls;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashSet;
-import java.util.LinkedHashSet;
+import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.Assert;
@@ -61,17 +63,20 @@ public abstract class NavigatorContentProvider extends TreeContentProvider {
protected void internalDone(Object caller, IStatus status) {
IFSTreeNode[] nodes = operation.getResult();
if (nodes != null) {
- final Set<IFSTreeNode> expandMe = new LinkedHashSet<IFSTreeNode>();
+ final List<IFSTreeNode> expandMe = new ArrayList<IFSTreeNode>();
for (IFSTreeNode node : nodes) {
while ((node = node.getParent()) != null) {
expandMe.add(node);
}
}
+ Collections.reverse(expandMe);
viewer.getControl().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
+ Set<IFSTreeNode> handled = new HashSet<IFSTreeNode>();
for (IFSTreeNode n : expandMe) {
- viewer.setExpandedState(n, true);
+ if (handled.add(n))
+ viewer.setExpandedState(n, true);
}
}
});

Back to the top