FindBugsJob runFindBugs = new FindBugsJob("Saving FindBugs XML data to " + fileName + "...", project) {
@Override
protected void runWithProgress(IProgressMonitor monitor) throws CoreException {
BugCollection bugCollection = FindbugsPlugin.getBugCollection(project, monitor);
try {
bugCollection.writeXML(fileName);
} catch (IOException e) {
CoreException ex = new CoreException(FindbugsPlugin.createErrorStatus(
"Can't write FindBugs bug collection from project " + project + " to file " + fileName, e));
throw ex;
}