public static void redisplayMarkers ( final IJavaProject javaProject ) { final IProject project = javaProject . getProject ( ) ; FindBugsJob job = new FindBugsJob ( "Refreshing SpotBugs markers" , project ) { @ Override protected void runWithProgress ( IProgressMonitor monitor ) throws CoreException { // TODO in case we removed some of previously available // detectors, we should // throw away bugs reported by them // Get the saved bug collection for the project SortedBugCollection bugs = FindbugsPlugin . getBugCollection ( project , monitor ) ; // Remove old markers project . deleteMarkers ( FindBugsMarker . NAME , true , IResource . DEPTH_INFINITE ) ; // Display warnings createMarkers ( javaProject , bugs , project , monitor ) ; } } ; job . setRule ( project ) ; job . scheduleInteractive ( ) ; }
Attempt to redisplay FindBugs problem markers for given project .