Package net.sf.pipet.gui

Examples of net.sf.pipet.gui.MessageReporterDialog


    }

    ConfigurationFileResource backup_resource = new ConfigurationFileResource(DEFAULT_CONFIGFILE);
    ConfigurationResource empty_resource = new ConfigurationDefaultResource();
   
    Messenger reporter = new MessageReporterDialog();
    EditorConfig cfg = readEditorConfig(reporter);

    if (cfgfile == null)
      cfgfile = cfg.getWorkingFile();

    Configuration pipesetup = null;
    boolean file_modified = false;
   
    if (cfgfile != null && cfg.getWorkingFile() != null && cfgfile.equals(cfg.getWorkingFile()) && DEFAULT_CONFIGFILE.lastModified() > cfgfile.lastModified())
    {
      int recover = JOptionPane.showConfirmDialog(null,
          "There may be unsaved changes to this file. Try to recover?",
                  "Recover",
                  JOptionPane.YES_NO_OPTION,
          JOptionPane.QUESTION_MESSAGE);
     
      if (recover == JOptionPane.YES_OPTION)
      {
        try {
          pipesetup = backup_resource.read();
          file_modified = true;
        } catch (Throwable e) {
        }
      }
    }
   
    if (pipesetup == null && cfgfile != null)
      pipesetup = parseConfigurationFile(cfg, cfgfile, reporter);
   
    if (pipesetup == null)
    {
      try {
        pipesetup = backup_resource.read();
      } catch (Throwable e) {
        e.printStackTrace();
        reporter.warn("Unable to load backup pipeline setup: "+e.getMessage());
      }
    }

    if (pipesetup == null)
    {
      try {
        pipesetup = empty_resource.read();
      } catch (Throwable e) {
        reporter.warn("Unable to load empty pipeline setup: "+e.toString());
      }
    }
   
    if (pipesetup == null)
      System.exit(1);
View Full Code Here

TOP

Related Classes of net.sf.pipet.gui.MessageReporterDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.