Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-06-25 08:55:47 -0400
committerUwe Stieber2015-06-25 08:55:47 -0400
commit161c7df7dfb3c7bf590c4709704b9b0ea02bd981 (patch)
tree52818773179644857598f04cb909a772e4064858 /target_explorer
parentaca48113d9d6990c70ad5c35e36e410ba565f38e (diff)
downloadorg.eclipse.tcf-161c7df7dfb3c7bf590c4709704b9b0ea02bd981.tar.gz
org.eclipse.tcf-161c7df7dfb3c7bf590c4709704b9b0ea02bd981.tar.xz
org.eclipse.tcf-161c7df7dfb3c7bf590c4709704b9b0ea02bd981.zip
Target Explorer: Fix file system explorer refresh
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/FSTreeNode.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefresh.java7
2 files changed, 9 insertions, 4 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/FSTreeNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/FSTreeNode.java
index 41c072a26..e972ffa47 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/FSTreeNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/FSTreeNode.java
@@ -559,6 +559,10 @@ public final class FSTreeNode extends FSTreeNodeBase implements IFilterable, org
}
public void setContent(FSTreeNode[] children, boolean notify) {
+ setContent(children, notify, true);
+ }
+
+ public void setContent(FSTreeNode[] children, boolean notify, boolean updateRefreshTime) {
final Comparator<FSTreeNode> comparator = getComparator();
Arrays.sort(children, comparator);
if (fChildren != null) {
@@ -579,7 +583,7 @@ public final class FSTreeNode extends FSTreeNodeBase implements IFilterable, org
}
}
}
- fRefreshTime = System.currentTimeMillis();
+ if (updateRefreshTime) fRefreshTime = System.currentTimeMillis();
setChildren(children, notify);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefresh.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefresh.java
index aefdc506a..b9915b375 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefresh.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefresh.java
@@ -165,11 +165,12 @@ public class OpRefresh extends AbstractOperation {
Delegate delegate = node.getRuntimeModel().getDelegate();
List<FSTreeNode> nodes = new ArrayList<FSTreeNode>(entries.length);
for (DirEntry entry : entries) {
- if (delegate.filterRoot(entry))
+ if (delegate.filterRoot(entry)) {
nodes.add(new FSTreeNode(node, entry.filename, true, entry.attrs));
+ }
}
node.setContent(nodes.toArray(new FSTreeNode[nodes.size()]), false);
- for (FSTreeNode node : nodes) {
+ for (FSTreeNode node : node.getChildren()) {
if (fRecursive || node.isFile()) {
fWork.addFirst(node);
}
@@ -235,7 +236,7 @@ public class OpRefresh extends AbstractOperation {
nodes[i++] = new FSTreeNode(node, entry.filename, false, entry.attrs);
}
node.setContent(nodes, false);
- for (FSTreeNode node : nodes) {
+ for (FSTreeNode node : node.getChildren()) {
if (fRecursive || node.isFile()) {
fWork.addFirst(node);
}

Back to the top