Lines 99-104
class CompilationUnitResolver extends Compiler {
Link Here
|
99 |
DefaultBindingResolver.BindingTables bindingTables; |
99 |
DefaultBindingResolver.BindingTables bindingTables; |
100 |
|
100 |
|
101 |
boolean hasCompilationAborted; |
101 |
boolean hasCompilationAborted; |
|
|
102 |
CategorizedProblem abortProblem; |
102 |
|
103 |
|
103 |
private IProgressMonitor monitor; |
104 |
private IProgressMonitor monitor; |
104 |
|
105 |
|
Lines 364-369
class CompilationUnitResolver extends Compiler {
Link Here
|
364 |
removeUnresolvedBindings(unit); |
365 |
removeUnresolvedBindings(unit); |
365 |
} |
366 |
} |
366 |
this.hasCompilationAborted = true; |
367 |
this.hasCompilationAborted = true; |
|
|
368 |
this.abortProblem = abortException.problem; |
367 |
} |
369 |
} |
368 |
|
370 |
|
369 |
public static void parse(ICompilationUnit[] compilationUnits, ASTRequestor astRequestor, int apiLevel, Map options, int flags, IProgressMonitor monitor) { |
371 |
public static void parse(ICompilationUnit[] compilationUnits, ASTRequestor astRequestor, int apiLevel, Map options, int flags, IProgressMonitor monitor) { |
Lines 689-699
class CompilationUnitResolver extends Compiler {
Link Here
|
689 |
// the bindings could not be resolved due to missing types in name environment |
691 |
// the bindings could not be resolved due to missing types in name environment |
690 |
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=86541 |
692 |
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=86541 |
691 |
CompilationUnitDeclaration unitDeclaration = parse(sourceUnit, nodeSearcher, options, flags); |
693 |
CompilationUnitDeclaration unitDeclaration = parse(sourceUnit, nodeSearcher, options, flags); |
692 |
final int problemCount = unit.compilationResult.problemCount; |
694 |
if (unit != null) { |
693 |
if (problemCount != 0) { |
695 |
final int problemCount = unit.compilationResult.problemCount; |
694 |
unitDeclaration.compilationResult.problems = new CategorizedProblem[problemCount]; |
696 |
if (problemCount != 0) { |
695 |
System.arraycopy(unit.compilationResult.problems, 0, unitDeclaration.compilationResult.problems, 0, problemCount); |
697 |
unitDeclaration.compilationResult.problems = new CategorizedProblem[problemCount]; |
696 |
unitDeclaration.compilationResult.problemCount = problemCount; |
698 |
System.arraycopy(unit.compilationResult.problems, 0, unitDeclaration.compilationResult.problems, 0, problemCount); |
|
|
699 |
unitDeclaration.compilationResult.problemCount = problemCount; |
700 |
} |
701 |
} else if (resolver.abortProblem != null) { |
702 |
unitDeclaration.compilationResult.problemCount = 1; |
703 |
unitDeclaration.compilationResult.problems = new CategorizedProblem[] { resolver.abortProblem }; |
697 |
} |
704 |
} |
698 |
return unitDeclaration; |
705 |
return unitDeclaration; |
699 |
} |
706 |
} |