use of dr.app.beauti.priorsPanel.DefaultPriorTableDialog in project beast-mcmc by beast-dev.
the class BeautiFrame method doGenerate.
public final boolean doGenerate() {
try {
generator.checkOptions();
} catch (Generator.GeneratorException ge) {
ge.printStackTrace(System.err);
JOptionPane.showMessageDialog(this, ge.getMessage(), "Invalid BEAUti setting : ", JOptionPane.ERROR_MESSAGE);
if (ge.getSwitchToPanel() != null) {
switchToPanel(ge.getSwitchToPanel());
}
return false;
}
DefaultPriorTableDialog defaultPriorDialog = new DefaultPriorTableDialog(this);
if (!defaultPriorDialog.showDialog(options)) {
return false;
}
File file = selectExportFile("Generate BEAST XML File...", new FileNameExtensionFilter("BEAST XML File", "xml", "beast"));
if (file != null) {
try {
getAllOptions();
generator.generateXML(file);
} catch (IOException ioe) {
ioe.printStackTrace(System.err);
JOptionPane.showMessageDialog(this, "Unable to generate file due to I/O issue: " + ioe.getMessage(), "Unable to generate file", JOptionPane.ERROR_MESSAGE);
return false;
} catch (Generator.GeneratorException e) {
e.printStackTrace(System.err);
JOptionPane.showMessageDialog(this, "The BEAST XML is incomplete because :\n" + e.getMessage(), "The BEAST XML is incomplete", JOptionPane.ERROR_MESSAGE);
return false;
} catch (Exception e) {
e.printStackTrace(System.err);
JOptionPane.showMessageDialog(this, "Unable to generate file: " + e.getMessage(), "Unable to generate file", JOptionPane.ERROR_MESSAGE);
return false;
}
clearDirty();
return true;
}
return false;
}
Aggregations