Ignore:
Timestamp:
2004-01-22T16:19:34+13:00 (20 years ago)
Author:
jmt12
Message:

Started effecting the changes requested by Ian and David. So far I've removed the complex arguments, and have ensured that the path is correct for downloads without page requisites. I've also tried to get the workspace tree to update properly, and it is much closer than before but it is now temporarily displaying the same node twice.

Location:
trunk/gli/src/org/greenstone/gatherer/file
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileSystemModel.java

    r6255 r6590  
    5858    FileNode first_node = (FileNode)path.getPathComponent(0);
    5959    if(current.equals(first_node)) {
    60         ///atherer.println("First path component matches root node.");
     60        Gatherer.println("First path component matches root node.");
    6161        // For each path with this tree path
    6262        for(int i = 1; current != null && i < path.getPathCount(); i++) {
    6363        // Retrieve the stale path
    64         FileNode stale_node = (FileNode) path.getPathComponent(i);
    65         ///atherer.print("Searching for '" + stale_node + "': ");
     64        Object stale_object = path.getPathComponent(i);
     65        FileNode stale_node = null;
     66        if(stale_object instanceof FileNode) {
     67            stale_node = (FileNode) stale_object;
     68        }
     69        Gatherer.print("Searching for '" + stale_node + "': ");
    6670        // Locate the fresh node by searching current's children. Remember to ensure that current is mapped.
    6771        current.map();
     
    7175        for(int j = 0; !found && j < current.getChildCount(); j++) {
    7276            FileNode child_node = (FileNode) current.getChildAt(j);
    73             ///atherer.print(child_node + " ");
    74             if(stale_node.equals(child_node)) {
     77            Gatherer.print(child_node + " ");
     78            if((stale_node != null && stale_node.equals(child_node)) || stale_object.toString().equals(child_node.toString())) {
    7579            found = true;
    7680            current = child_node;
    77             ///atherer.println("Found!");
     81            Gatherer.println("Found!");
    7882            }
    7983            child_node = null;
     
    8286        for(int j = 0; !found && j < current.size(); j++) {
    8387            FileNode child_node = (FileNode) current.get(j);
    84             ///atherer.print(child_node + " ");
    85             if(stale_node.equals(child_node)) {
     88            Gatherer.print(child_node + " ");
     89            if((stale_node != null && stale_node.equals(child_node)) || stale_object.toString().equals(child_node.toString())) {
    8690            found = true;
    8791            current = child_node;
    88             ///atherer.println("Found!");
     92            Gatherer.println("Found!");
    8993            }
    9094            child_node = null;
     
    9397        if(!found) {
    9498            current = null;
    95             ///atherer.println("Not Found!");
     99            Gatherer.println("Not Found!");
    96100        }
    97101        // Repeat as necessary
    98102        }
    99103    }
    100     ///atherer.println("Returning node: " + new TreePath(current.getPath()));
     104    Gatherer.println("Returning node: " + new TreePath(current.getPath()));
    101105    return current;
    102106    }
  • trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTreeModel.java

    r6582 r6590  
    9191
    9292    loadWebCacheMappings();
     93       
    9394    }
    9495
Note: See TracChangeset for help on using the changeset viewer.