Lines 38-43
Link Here
|
38 |
import org.eclipse.jdt.internal.compiler.lookup.TypeIds; |
38 |
import org.eclipse.jdt.internal.compiler.lookup.TypeIds; |
39 |
import org.eclipse.jdt.internal.compiler.parser.diagnose.DiagnoseParser; |
39 |
import org.eclipse.jdt.internal.compiler.parser.diagnose.DiagnoseParser; |
40 |
import org.eclipse.jdt.internal.compiler.problem.AbortCompilation; |
40 |
import org.eclipse.jdt.internal.compiler.problem.AbortCompilation; |
|
|
41 |
import org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit; |
41 |
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter; |
42 |
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter; |
42 |
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities; |
43 |
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities; |
43 |
import org.eclipse.jdt.internal.compiler.util.Messages; |
44 |
import org.eclipse.jdt.internal.compiler.util.Messages; |
Lines 7704-7711
Link Here
|
7704 |
try { |
7705 |
try { |
7705 |
this.diet = true; |
7706 |
this.diet = true; |
7706 |
parsedUnit = parse(sourceUnit, compilationResult); |
7707 |
parsedUnit = parse(sourceUnit, compilationResult); |
7707 |
} |
7708 |
} finally { |
7708 |
finally { |
|
|
7709 |
this.diet = old; |
7709 |
this.diet = old; |
7710 |
} |
7710 |
} |
7711 |
return parsedUnit; |
7711 |
return parsedUnit; |
Lines 9033-9041
Link Here
|
9033 |
initialize(true); |
9033 |
initialize(true); |
9034 |
goForCompilationUnit(); |
9034 |
goForCompilationUnit(); |
9035 |
|
9035 |
|
|
|
9036 |
/* unit creation */ |
9037 |
this.referenceContext = |
9038 |
this.compilationUnit = |
9039 |
new CompilationUnitDeclaration( |
9040 |
this.problemReporter, |
9041 |
compilationResult, |
9042 |
0); |
9043 |
|
9036 |
/* scanners initialization */ |
9044 |
/* scanners initialization */ |
9037 |
char[] contents = sourceUnit.getContents(); |
9045 |
char[] contents; |
|
|
9046 |
try { |
9047 |
contents = sourceUnit.getContents(); |
9048 |
} catch(AbortCompilationUnit e) { |
9049 |
this.problemReporter().cannotReadSource(this.compilationUnit, e.exception); |
9050 |
contents = CharOperation.NO_CHAR; // pretend empty from thereon |
9051 |
} |
9038 |
this.scanner.setSource(contents); |
9052 |
this.scanner.setSource(contents); |
|
|
9053 |
this.compilationUnit.sourceEnd = this.scanner.source.length - 1; |
9039 |
if (end != -1) this.scanner.resetTo(start, end); |
9054 |
if (end != -1) this.scanner.resetTo(start, end); |
9040 |
if (this.javadocParser != null && this.javadocParser.checkDocComment) { |
9055 |
if (this.javadocParser != null && this.javadocParser.checkDocComment) { |
9041 |
this.javadocParser.scanner.setSource(contents); |
9056 |
this.javadocParser.scanner.setSource(contents); |
Lines 9043-9055
Link Here
|
9043 |
this.javadocParser.scanner.resetTo(start, end); |
9058 |
this.javadocParser.scanner.resetTo(start, end); |
9044 |
} |
9059 |
} |
9045 |
} |
9060 |
} |
9046 |
/* unit creation */ |
|
|
9047 |
this.referenceContext = |
9048 |
this.compilationUnit = |
9049 |
new CompilationUnitDeclaration( |
9050 |
this.problemReporter, |
9051 |
compilationResult, |
9052 |
this.scanner.source.length); |
9053 |
/* run automaton */ |
9061 |
/* run automaton */ |
9054 |
parse(); |
9062 |
parse(); |
9055 |
} finally { |
9063 |
} finally { |