//final ProjectFilterSettings projectFilterSettings = _userPrefs.getFilterSettings();
_bugReporter.setPriorityThreshold(_userPrefs.getUserDetectorThreshold());
//_bugReporter.setPriorityThreshold(projectFilterSettings.getMinPriorityAsInt());
// Create IFindBugsEngine
final IFindBugsEngine engine = new FindBugs2();
engine.setNoClassOk(true);
engine.setMergeSimilarWarnings(false);
engine.setBugReporter(_bugReporter);
engine.setProject(_findBugsProject);
engine.setProgressCallback(_bugReporter);
//engine.setScanNestedArchives(true); // todo: prefrences Bean
//engine.setRelaxedReportingMode(true); // todo: prefrences Bean
//engine.setRankThreshold(99);
configureFilter(engine);
// add plugins to detector collection
final DetectorFactoryCollection factoryCollection = FindBugsPreferences.getDetectorFactorCollection();
engine.setDetectorFactoryCollection(factoryCollection);
//engine.excludeBaselineBugs(_userPrefs.getExcludeBugsFiles());
// configure detectors.
engine.setUserPreferences(_userPrefs);
return engine;
}