public void run() {
final boolean runningBatch = igvArgs.getBatchFile() != null;
BatchRunner.setIsBatchMode(runningBatch);
final ProgressMonitor monitor = new ProgressMonitor();
final ProgressBar.ProgressDialog progressDialog = ProgressBar.showProgressDialog(mainFrame, "Initializing...", monitor, false);
progressDialog.getProgressBar().setIndeterminate(true);
monitor.fireProgressChange(20);
mainFrame.setIconImage(getIconImage());
if (Globals.IS_MAC) {
setAppleDockIcon();
}
final PreferenceManager preferenceManager = PreferenceManager.getInstance();
try {
contentPane.getCommandBar().initializeGenomeList(monitor);
} catch (FileNotFoundException ex) {
JOptionPane.showMessageDialog(mainFrame, "Error initializing genome list: " + ex.getMessage());
log.error("Error initializing genome list: ", ex);
} catch (NoRouteToHostException ex) {
JOptionPane.showMessageDialog(mainFrame, "Network error initializing genome list: " + ex.getMessage());
log.error("Network error initializing genome list: ", ex);
} finally {
monitor.fireProgressChange(50);
closeWindow(progressDialog);
}
if (igvArgs.getGenomeId() != null) {
IGV.getInstance().loadGenomeById(igvArgs.getGenomeId());