}
return result;
}
private boolean createReport() {
ICoverageSession session = page1.getSelectedSession();
final ISessionExporter exporter = CoverageTools.getExporter(session);
exporter.setFormat(page1.getReportFormat());
exporter.setDestination(page1.getDestination());
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
try {
exporter.export(monitor);
} catch (Exception e) {
throw new InvocationTargetException(e);
}
}
};
try {
getContainer().run(true, true, op);
} catch (InterruptedException e) {
return false;
} catch (InvocationTargetException ite) {
Throwable ex = ite.getTargetException();
EclEmmaUIPlugin.log(ex);
String title = UIMessages.ExportReportErrorDialog_title;
String msg = UIMessages.ExportReportErrorDialog_message;
msg = NLS.bind(msg, session.getDescription());
IStatus status;
if (ex instanceof CoreException) {
status = ((CoreException) ex).getStatus();
} else {
status = EclEmmaUIPlugin.errorStatus(String.valueOf(ex.getMessage()), ex);