Ignore:
Timestamp:
2020-06-18T00:06:23+12:00 (4 years ago)
Author:
ak19
Message:

Collection ConfigFileEditor related changes, bugfixes and improvements: 1. In investigating why clientGLI > Edit > collectionConfig.xml > Save button didn't save and get reflected in the interface, found that regular GLI had the same problem. A simple all to c_man.saveCollection() fixed it for GLI, apparently should do so for client-GLI too but still to test. 2. A larger change is to make sure edits in GLI that affect collCfg.xml get saved to collCfg.xml before Edit > collCfg.xml loads the config file. This includes user values entered in controls being edited in the currently selected GLI pane. GLI code gave me a massive run-around to figure how its magic auto-save feature was working but I think I've figured it out now: It's that in GLI Panes which affect colCfg.xml (like Format pane), the loseFocus() on a GLI Pane triggers loseFocus() on GUI controls in that Pane (e.g. Format Pane's General field controls). These controls then save their current values to the collConfig in memory. Then an explicit call to c_man.saveCollection() happens. So just calling c_man.saveCollection before an Edit > collCfg.xml operation won't save the active edits in the current controls of the selected GLI Pane. Based on this understanding, I've forced a loseFocus() on the current pane, to force it to save the current state of its controls, before GLI loads the CollConfigEditor. It works. 3. ConfigFileEditor in GLI (and therefore hopefully in client-GLI too) no longer closes and reopens the collection on saving colcfg edits. This was a quick fix in the past to the problem of getting GLI to immediately reflect changes made to the currently open collection's colcfg.xml file. With the fixes in (1) and (2) this commit is able make a useful improvement to this behaviour, as the changes in this commit avoid having to close and reopen a collection after saving changes in CollConfigEditor, while aiming for the same effect of getting the interface to immediately reflect the edits. Great gains could especially be had with client-GLI, assuming this commit works for it too, as the close then reloading collection operation can take such a long time with client-GLI. Fingers crossed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java

    r32704 r34205  
    120120    }
    121121
     122
     123    public void reloadConfig() {
     124    // Parse and load the current collection configuration again
     125    // Used after GLI > Edit > collectionConfig.xml > Save to get these edits into GLI.
     126   
     127    collect_config.reload();
     128    if (DebugStream.isDebuggingEnabled()) {
     129        collect_config.display();
     130    }
     131    loadDesignDetails();
     132    DebugStream.println("CollectionDesignModule loaded.");
     133    }
     134
    122135    /** Reloads the various managers to ensure they have built themselves from the latest details available in the collection configuration class
    123136     * @see org.greenstone.gatherer.cdm.ClassifierManager
Note: See TracChangeset for help on using the changeset viewer.