Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-01-30 17:01:20 +0000
committerMichael Valenta2003-01-30 17:01:20 +0000
commit170f90900d06e7483f9b139cff11d1e3c7b70971 (patch)
tree9918c3de4d1fc03801a4057b871da68acf4b6056
parent6348f2df60defb9e66f068812526c17d7379bb2b (diff)
downloadeclipse.platform.team-170f90900d06e7483f9b139cff11d1e3c7b70971.tar.gz
eclipse.platform.team-170f90900d06e7483f9b139cff11d1e3c7b70971.tar.xz
eclipse.platform.team-170f90900d06e7483f9b139cff11d1e3c7b70971.zip
Optimized local workspace visiting slightly
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java49
1 files changed, 40 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java
index 48552678f..56f58e975 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java
@@ -68,17 +68,48 @@ class FileStructureVisitor extends AbstractStructureVisitor {
}
// Send files, then the questionable folders, then the managed folders
- ICVSResource[] files = mFolder.members(ICVSFolder.FILE_MEMBERS);
- for (int i = 0; i < files.length; i++) {
- files[i].accept(this);
+ ICVSResource[] children = mFolder.members(ICVSFolder.ALL_UNIGNORED_MEMBERS);
+ sendFiles(children);
+ sendQuestionableFolders(children);
+ sendManagedFolders(children);
+ }
+
+ /**
+ * Method sendManagedFolders.
+ * @param children
+ */
+ private void sendManagedFolders(ICVSResource[] children) throws CVSException {
+ for (int i = 0; i < children.length; i++) {
+ ICVSResource resource = children[i];
+ if (resource.isFolder() && resource.isManaged()) {
+ resource.accept(this);
+ }
}
- ICVSResource[] folders = mFolder.members(ICVSFolder.FOLDER_MEMBERS | ICVSFolder.UNMANAGED_MEMBERS);
- for (int i = 0; i < folders.length; i++) {
- folders[i].accept(this);
+ }
+
+ /**
+ * Method sendQuestionableFolders.
+ * @param children
+ */
+ private void sendQuestionableFolders(ICVSResource[] children) throws CVSException {
+ for (int i = 0; i < children.length; i++) {
+ ICVSResource resource = children[i];
+ if (resource.isFolder() && ! resource.isManaged()) {
+ resource.accept(this);
+ }
}
- folders = mFolder.members(ICVSFolder.FOLDER_MEMBERS | ICVSFolder.MANAGED_MEMBERS);
- for (int i = 0; i < folders.length; i++) {
- folders[i].accept(this);
+ }
+
+ /**
+ * Method sendFiles.
+ * @param children
+ */
+ private void sendFiles(ICVSResource[] children) throws CVSException {
+ for (int i = 0; i < children.length; i++) {
+ ICVSResource resource = children[i];
+ if (!resource.isFolder()) {
+ resource.accept(this);
+ }
}
}

Back to the top