- Timestamp:
- 2004-10-08T09:46:12+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/file/FileSystemModel.java
r7491 r8236 6 6 import javax.swing.event.*; 7 7 import javax.swing.tree.*; 8 import org.greenstone.gatherer.DebugStream; 8 9 import org.greenstone.gatherer.Dictionary; 9 10 import org.greenstone.gatherer.Gatherer; … … 59 60 FileNode first_node = (FileNode)path.getPathComponent(0); 60 61 if(current.equals(first_node)) { 61 Gatherer.println("First path component matches root node.");62 DebugStream.println("First path component matches root node."); 62 63 // For each path with this tree path 63 64 for(int i = 1; current != null && i < path.getPathCount(); i++) { … … 68 69 stale_node = (FileNode) stale_object; 69 70 } 70 Gatherer.print("Searching for '" + stale_object + "': ");71 DebugStream.print("Searching for '" + stale_object + "': "); 71 72 // Locate the fresh node by searching current's children. Remember to ensure that current is mapped. 72 73 //current.unmap(); … … 76 77 for(int j = 0; !found && j < current.getChildCount(); j++) { 77 78 FileNode child_node = (FileNode) current.getChildAt(j); 78 Gatherer.print(child_node + " ");79 DebugStream.print(child_node + " "); 79 80 if((stale_node != null && stale_node.equals(child_node)) || stale_object.toString().equals(child_node.toString())) { 80 81 found = true; 81 82 current = child_node; 82 Gatherer.println("Found!");83 DebugStream.println("Found!"); 83 84 } 84 85 child_node = null; … … 87 88 for(int j = 0; !found && j < current.size(); j++) { 88 89 FileNode child_node = (FileNode) current.get(j); 89 Gatherer.print(child_node + " ");90 DebugStream.print(child_node + " "); 90 91 if((stale_node != null && stale_node.equals(child_node)) || stale_object.toString().equals(child_node.toString())) { 91 92 found = true; 92 93 current = child_node; 93 Gatherer.println("Found!");94 DebugStream.println("Found!"); 94 95 } 95 96 child_node = null; … … 98 99 if(!found) { 99 100 current = null; 100 Gatherer.println("Not Found!");101 DebugStream.println("Not Found!"); 101 102 } 102 103 else { 103 Gatherer.println("Returning node: " + new TreePath(current.getPath()));104 DebugStream.println("Returning node: " + new TreePath(current.getPath())); 104 105 } 105 106 // Repeat as necessary
Note:
See TracChangeset
for help on using the changeset viewer.