public void exit(boolean kill) { log.debug("Exiting application"); PreferencesStore.savePreferences(); FileOutputStream out = null; File a = getApplicationPreferencesDirectory(); if (a != null) { try { File f = new File(getApplicationPreferencesDirectory(), getApplicationName() + ".mru"); ; if (log.isDebugEnabled()) { log.debug("Saving MRU to " + f.getAbsolutePath()); } out = new FileOutputStream(f); PrintWriter w = new PrintWriter(out, true); w.println(mruModel.getMRUList().toString()); } catch (IOException ioe) { log.error("Could not save MRU. ", ioe); } finally { IOUtil.closeStream(out); } } else { log.debug("Not saving preferences because no preferences directory is available."); } if (kill) { com.sshtools.common.util.ShutdownHooks.exit(kill); } }
public void stop() { com.sshtools.common.util.ShutdownHooks.exit(false); applicationPanel.getApplication().exit(false); }