@ SuppressWarnings ( "rawtypes" ) @ Override protected IProject [ ] build ( int kind , Map args , IProgressMonitor monitor ) throws CoreException { monitor . subTask ( "Running SpotBugs..." ) ; switch ( kind ) { case IncrementalProjectBuilder . FULL_BUILD : { FindBugs2Eclipse . cleanClassClache ( getProject ( ) ) ; if ( FindbugsPlugin . getUserPreferences ( getProject ( ) ) . isRunAtFullBuild ( ) ) { if ( DEBUG ) { System . out . println ( "FULL BUILD" ) ; } doBuild ( args , monitor , kind ) ; } else { // TODO probably worth to cleanup? // MarkerUtil.removeMarkers(getProject()); } break ; } case IncrementalProjectBuilder . INCREMENTAL_BUILD : { if ( DEBUG ) { System . out . println ( "INCREMENTAL BUILD" ) ; } doBuild ( args , monitor , kind ) ; break ; } case IncrementalProjectBuilder . AUTO_BUILD : { if ( DEBUG ) { System . out . println ( "AUTO BUILD" ) ; } doBuild ( args , monitor , kind ) ; break ; } default : { FindbugsPlugin . getDefault ( ) . logWarning ( "UKNOWN BUILD kind" + kind ) ; doBuild ( args , monitor , kind ) ; break ; } } return null ; }
Run the builder .