task = "Running Crystal on " +
num_jobs + " total compilation units.";
monitor.beginTask(task, num_jobs);
}
AnnotationDatabase annoDB = new AnnotationDatabase();
AnnotationFinder finder = new AnnotationFinder(annoDB);
// register annotations with database
registerAnnotationsWithDatabase(annoDB);
// run the annotation finder on everything
if (monitor != null)
monitor.subTask("Scanning annotations of analyzed compilation units");
if (logger.isLoggable(Level.FINER))
logger.finer("Scanning annotations of analyzed compilation units");
for (ICompilationUnit compUnit : command.compilationUnits()) {
if (compUnit == null)
continue;
ASTNode node = WorkspaceUtilities.getASTNodeFromCompilationUnit(compUnit);
if (monitor != null && monitor.isCanceled())
// cancel here in case cancellation can produce null or incomplete ASTs
return;
if (!(node instanceof CompilationUnit))
continue;
// Dummy analysis input
IAnalysisInput input = new IAnalysisInput() {
private AnnotationDatabase annoDB = new AnnotationDatabase();
public AnnotationDatabase getAnnoDB() {
return annoDB;
}