filePath = c.getSelectedFile().getPath();
}
// if file dose not exist.
if (!new File(filePath).isFile()) {
// Call PlanetXMLDIalog with the file path.
PlanetXMLProgressDialog planetXMLProgressDialog = new PlanetXMLProgressDialog(this, true, filePath,
profileId, globalContext.getReportManager());
planetXMLProgressDialog.show();
// if Overwrite option is selected.
} else if (JOptionPane.showConfirmDialog(this, "File already exists. Do you want to overwrite.",
"File already exists", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
PlanetXMLProgressDialog planetXMLProgressDialog = new PlanetXMLProgressDialog(this, true, filePath,
profileId, globalContext.getReportManager());
planetXMLProgressDialog.setLocationRelativeTo(this);
planetXMLProgressDialog.show();
}
}
} else {
JOptionPane.showMessageDialog(this, "Selected profile not paused or finished.", "Profile state error",