protected void work(final IResource resource,final List<WorkItem> resources,IProgressMonitor monitor){
  IPreferenceStore store=FindbugsPlugin.getPluginPreferences(getProject());
  boolean runAsJob=store.getBoolean(FindBugsConstants.KEY_RUN_ANALYSIS_AS_EXTRA_JOB);
  FindBugsJob fbJob=new StartedFromBuilderJob("Finding bugs in " + resource.getName() + "...",resource,resources);
  if (runAsJob) {
    if (DEBUG) {
      FindbugsPlugin.log("cancelSimilarJobs");
    }
    FindBugsJob.cancelSimilarJobs(fbJob);
    if (DEBUG) {
      FindbugsPlugin.log("scheduleAsSystem");
    }
    fbJob.scheduleAsSystem();
    if (DEBUG) {
      FindbugsPlugin.log("done scheduleAsSystem");
    }
  }
 else {
    if (DEBUG) {
      FindbugsPlugin.log("running fbJob");
    }
    fbJob.run(monitor);
    if (DEBUG) {
      FindbugsPlugin.log("done fbJob");
    }
  }
}

protected void work ( final IResource resource , final List < WorkItem > resources , IProgressMonitor monitor ) { IPreferenceStore store = FindbugsPlugin . getPluginPreferences ( getProject ( ) ) ; boolean runAsJob = store . getBoolean ( FindBugsConstants . KEY_RUN_ANALYSIS_AS_EXTRA_JOB ) ; FindBugsJob fbJob = new StartedFromBuilderJob ( "Finding bugs in " + resource . getName ( ) + "..." , resource , resources ) ; if ( runAsJob ) { if ( DEBUG ) { FindbugsPlugin . log ( "cancelSimilarJobs" ) ; } FindBugsJob . cancelSimilarJobs ( fbJob ) ; if ( DEBUG ) { FindbugsPlugin . log ( "scheduleAsSystem" ) ; } fbJob . scheduleAsSystem ( ) ; if ( DEBUG ) { FindbugsPlugin . log ( "done scheduleAsSystem" ) ; } } else { if ( DEBUG ) { FindbugsPlugin . log ( "running fbJob" ) ; } fbJob . run ( monitor ) ; if ( DEBUG ) { FindbugsPlugin . log ( "done fbJob" ) ; } } }
run a findbugs analysis on the given resource as build job but not delaying the current java build
