/** Save cached objects. */
 void save() {
   try {
     XMLObjectCache cache = new XMLObjectCache();
     try {
       if (_rootFolder != null) {
         cache.add(_rootFolder);
       }
     } catch (DuplicateObjectException ignore) {
     }
     cache.save(_queriesFileName);
   } catch (IOException ex) {
     final Logger logger = _app.getLogger();
     logger.showMessage(
         Logger.ILogTypes.ERROR, "Error occured saving queries to " + _queriesFileName);
     logger.showMessage(Logger.ILogTypes.ERROR, ex);
   } catch (XMLException ex) {
     final Logger logger = _app.getLogger();
     logger.showMessage(
         Logger.ILogTypes.ERROR, "Error occured saving queries to " + _queriesFileName);
     logger.showMessage(Logger.ILogTypes.ERROR, ex);
   }
 }
Exemple #2
0
 /**
  * Save preferences to disk.
  *
  * @param prefsFile File to save preferences to.
  */
 private void savePrefs(FileWrapper prefsFile) throws IOException, XMLException {
   _settingsCache.save(prefsFile.getPath());
 }