this.basicParser.reportOnlyOneSyntaxError = true;
this.basicParser.scanner.taskTags = null;
this.cud = this.basicParser.parse(this.compilationUnit, new CompilationResult(this.compilationUnit, 0, 0, this.options.maxProblemsPerUnit));
// Use a non model name environment to avoid locks, monitors and such.
INameEnvironment nameEnvironment = new JavaSearchNameEnvironment(javaProject, JavaModelManager.getJavaModelManager().getWorkingCopies(DefaultWorkingCopyOwner.PRIMARY, true/*add primary WCs*/));
this.lookupEnvironment = new LookupEnvironment(this, this.options, problemReporter, nameEnvironment);
reduceParseTree(this.cud);
this.lookupEnvironment.buildTypeBindings(this.cud, null);
this.lookupEnvironment.completeTypeBindings();
this.cud.scope.faultInTypes();