Ignore:
Timestamp:
2004-06-23T14:35:58+12:00 (20 years ago)
Author:
mdewsnip
Message:

Some function and variable name changes, and added the web cache/downloaded files mapping back in.

File:
1 edited

Legend:

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

    r7494 r7633  
    1515    static private WorkspaceTreeModel workspace_tree_model = null;
    1616
    17     static private FileNode greenstone_collections_mapping = null;
    18     static private FileNode local_filespace_mapping = null;
    19     // static private FileNode web_cache_mapping = null;
     17    static private FileNode greenstone_collections_node = null;
     18    static private FileNode local_filespace_node = null;
     19    static private FileNode downloaded_files_node = null;
    2020    static private FileNode[] folder_shortcuts = null;
    2121
     
    3333    workspace_tree_model = new WorkspaceTreeModel(workspace_tree_root);
    3434
    35     // Add the Greenstone Collections mapping
    36     greenstone_collections_mapping = CollectionManager.getGreenstoneCollectionsMapping();
    37     workspace_tree_root.insert(greenstone_collections_mapping);
     35    // Add the "Documents in Greenstone Collections" node
     36    greenstone_collections_node = CollectionManager.getGreenstoneCollectionsMapping();
     37    workspace_tree_root.insert(greenstone_collections_node);
    3838
    39     // Add the local filespace
    40     local_filespace_mapping = FileSystem.getLocalFileSystem(workspace_tree_model);
    41     workspace_tree_root.insert(local_filespace_mapping);
     39    // Add the "Local Filespace" node
     40    local_filespace_node = FileSystem.getLocalFilespaceNode(workspace_tree_model);
     41    workspace_tree_root.insert(local_filespace_node);
    4242
    43     // Add a mapping to the user home folder
    44     workspace_tree_root.insert(FileSystem.getUserHomeMapping());
     43    // Add the "Home Folder" node
     44    workspace_tree_root.insert(FileSystem.getHomeFolderNode());
    4545
    46     // Add public and private web caches if applicable
    47     // loadWebCacheMappings();
     46    // Add the "Downloaded Files" node, if Mirroring is enabled
     47    if (Gatherer.g_man.mirror_pane != null) {
     48        downloaded_files_node = FileSystem.getDownloadedFilesNode();
     49        workspace_tree_root.insert(downloaded_files_node);
     50    }
    4851
    4952    // Add any folder shortcuts the user has created
     
    5457
    5558
    56     static public void refreshGreenstoneCollectionsMapping()
     59    static public void refreshGreenstoneCollectionsNode()
    5760    {
    58     greenstone_collections_mapping.refresh();
     61    greenstone_collections_node.refresh();
    5962    }
    6063
     
    105108
    106109    // Refresh the local filespace tree specially (it is not unmapped so not refreshed)
    107     for (int i = 0; i < local_filespace_mapping.getChildCount(); i++) {
    108         FileNode child_node = (FileNode) local_filespace_mapping.getChildAt(i);
     110    for (int i = 0; i < local_filespace_node.getChildCount(); i++) {
     111        FileNode child_node = (FileNode) local_filespace_node.getChildAt(i);
    109112        super.refresh(new TreePath(child_node.getPath()));
    110113    }
Note: See TracChangeset for help on using the changeset viewer.