Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Chen2012-05-14 05:41:21 +0000
committerWilliam Chen2012-05-14 05:41:21 +0000
commitc30f63c097b6aadb85ec892f9518bcc4ff2d0874 (patch)
tree834d0f858221af4300ad89920d3356534bfd3be6 /target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui
parentc4bc14d4cdf1a5ebdc02d68f67f41650b9bd9015 (diff)
downloadorg.eclipse.tcf-c30f63c097b6aadb85ec892f9518bcc4ff2d0874.tar.gz
org.eclipse.tcf-c30f63c097b6aadb85ec892f9518bcc4ff2d0874.tar.xz
org.eclipse.tcf-c30f63c097b6aadb85ec892f9518bcc4ff2d0874.zip
Target Explorer: Display the pending node while expanding the tree node.
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java14
2 files changed, 6 insertions, 12 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java
index b58011b40..16cc4ac4f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java
@@ -9,15 +9,15 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.filesystem.ui.controls;
-import org.eclipse.jface.viewers.TreePathViewerSorter;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementComparator;
+import org.eclipse.tcf.te.ui.trees.TreeViewerSorter;
/**
* File system tree control viewer sorter implementation.
*/
-public class FSTreeViewerSorter extends TreePathViewerSorter {
+public class FSTreeViewerSorter extends TreeViewerSorter {
private final FSTreeElementComparator comparator;
/**
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 f13e3cc07..f145a2fe3 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,6 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.filesystem.ui.controls;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;
@@ -52,21 +53,14 @@ public abstract class NavigatorContentProvider extends TreeContentProvider {
} else if (parentElement instanceof AbstractTreeNode) {
AbstractTreeNode node = (AbstractTreeNode)parentElement;
Object[] children = NO_ELEMENTS;
- List<? extends AbstractTreeNode> current = node.getChildren();
+ List<Object> current = new ArrayList<Object>(node.getChildren());
if (!node.childrenQueried) {
- if (current.isEmpty()) {
- children = new Object[] { getPending(node) };
- }
- else {
- children = current.toArray();
- }
+ current.add(getPending(node));
if (!node.childrenQueryRunning) {
node.queryChildren();
}
}
- else {
- children = current.toArray();
- }
+ children = current.toArray();
return children;
}

Back to the top