Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Chen2012-05-31 09:30:05 +0000
committerWilliam Chen2012-05-31 09:30:05 +0000
commit41608545c531048bc3d0c1221de17e52ea92f2d6 (patch)
treefe38b4d3418dd18b36757c3b145532e30bf139c5 /target_explorer
parent440feb0d35714c33ded9434a42cc4053a7c54c5e (diff)
downloadorg.eclipse.tcf-41608545c531048bc3d0c1221de17e52ea92f2d6.tar.gz
org.eclipse.tcf-41608545c531048bc3d0c1221de17e52ea92f2d6.tar.xz
org.eclipse.tcf-41608545c531048bc3d0c1221de17e52ea92f2d6.zip
Target Explorer: Add missing comments for ILazyLoader adapters.
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeLoader.java20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeLoader.java19
3 files changed, 39 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
index ce12fb273..0ef393d90 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
@@ -60,6 +60,7 @@ public class FSTreeNodeAdapterFactory implements IAdapterFactory {
return new PersistableNode(node);
}
else if(adapterType == ILazyLoader.class) {
+ if(node.isFile()) return null;
return new FSTreeNodeLoader(node);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeLoader.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeLoader.java
index a3cc3d0da..229e27bfc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeLoader.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeLoader.java
@@ -19,17 +19,35 @@ import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.Operation;
import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.ui.interfaces.ILazyLoader;
+/**
+ * The implementation of ILazyLoader for FSTreeNode check its data availability
+ * and load its children if not ready.
+ */
public class FSTreeNodeLoader implements ILazyLoader {
+ // The node to be checked.
private FSTreeNode node;
+ /**
+ * Constructor
+ *
+ * @param node The file/folder node.
+ */
public FSTreeNodeLoader(FSTreeNode node) {
this.node = node;
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.ILazyLoader#isDataLoaded()
+ */
@Override
public boolean isDataLoaded() {
- return (node.isSystemRoot() || node.isDirectory()) && node.childrenQueried;
+ return node.isFile() || (node.isSystemRoot() || node.isDirectory()) && node.childrenQueried;
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.ILazyLoader#loadData(org.eclipse.core.runtime.IProgressMonitor)
+ */
@Override
public void loadData(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeLoader.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeLoader.java
index 264d11070..ba16cf5e1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeLoader.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeLoader.java
@@ -19,17 +19,36 @@ import org.eclipse.tcf.te.tcf.core.concurrent.Rendezvous;
import org.eclipse.tcf.te.tcf.processes.core.model.ProcessTreeNode;
import org.eclipse.tcf.te.ui.interfaces.ILazyLoader;
+/**
+ * The implementation of ILazyLoader for ProcessTreeNode check its data availability
+ * and load its children if not ready.
+ */
public class ProcessTreeNodeLoader implements ILazyLoader {
+ // The node to be checked.
private ProcessTreeNode node;
+
+ /**
+ * Constructor
+ *
+ * @param node the process node.
+ */
public ProcessTreeNodeLoader(ProcessTreeNode node) {
this.node = node;
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.ILazyLoader#isDataLoaded()
+ */
@Override
public boolean isDataLoaded() {
return node.childrenQueried;
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.ILazyLoader#loadData(org.eclipse.core.runtime.IProgressMonitor)
+ */
@Override
public void loadData(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
final Rendezvous rendezvous = new Rendezvous();

Back to the top