WorkingCopyOwner owner,
int flags,
IProgressMonitor monitor) {
CancelableNameEnvironment environment = null;
CancelableProblemFactory problemFactory = null;
try {
if (monitor != null) {
int amountOfWork = (compilationUnits.length + bindingKeys.length) * 2; // 1 for beginToCompile, 1 for resolve
monitor.beginTask("", amountOfWork); //$NON-NLS-1$
}
environment = new CancelableNameEnvironment(((JavaProject) javaProject), owner, monitor);
problemFactory = new CancelableProblemFactory(monitor);
CompilationUnitResolver resolver =
new CompilationUnitResolver(
environment,
getHandlingPolicy(),
getCompilerOptions(options, (flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0),