CompilationUnitDeclaration parsedUnit = parsedUnits[i];
if (parsedUnit != null) {
try {
if (hasLocalType[i]) { // NB: no-op if method bodies have been already parsed
if (monitor != null && monitor.isCanceled())
throw new OperationCanceledException();
parser.getMethodBodies(parsedUnit);
}
} catch (AbortCompilation e) {
// classpath problem for this type: don't try to resolve (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49809)
hasLocalType[i] = false;
}
}
}
// complete type bindings and build fields and methods only for local types
// (in this case the constructor is needed when resolving local types)
// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=145333)
try {
this.lookupEnvironment.completeTypeBindings(parsedUnits, hasLocalType, unitsIndex);
// remember type bindings
for (int i = 0; i < unitsIndex; i++) {
CompilationUnitDeclaration parsedUnit = parsedUnits[i];
if (parsedUnit != null && !parsedUnit.hasErrors()) {
boolean containsLocalType = hasLocalType[i];
if (containsLocalType) {
if (monitor != null && monitor.isCanceled())
throw new OperationCanceledException();
parsedUnit.scope.faultInTypes();
parsedUnit.resolve();
}
rememberAllTypes(parsedUnit, cus[i], containsLocalType);