Lines 89-95
Link Here
|
89 |
// if no reference context, we need to abort from the current compilation process |
89 |
// if no reference context, we need to abort from the current compilation process |
90 |
if (referenceContext == null) { |
90 |
if (referenceContext == null) { |
91 |
if ((severity & Error) != 0) { // non reportable error is fatal |
91 |
if ((severity & Error) != 0) { // non reportable error is fatal |
92 |
IProblem problem = this.createProblem(null, problemId, problemArguments, messageArguments, severity, 0, 0, 0); |
92 |
if (problemId == IProblem.UnusedImport) return; |
|
|
93 |
IProblem problem = this.createProblem(null, problemId, problemArguments, messageArguments, severity, 0, 0, 0); |
93 |
throw new AbortCompilation(null, problem); |
94 |
throw new AbortCompilation(null, problem); |
94 |
} else { |
95 |
} else { |
95 |
return; // ignore non reportable warning |
96 |
return; // ignore non reportable warning |
Lines 113-126
Link Here
|
113 |
switch (severity & Error) { |
114 |
switch (severity & Error) { |
114 |
case Error : |
115 |
case Error : |
115 |
this.record(problem, unitResult, referenceContext); |
116 |
this.record(problem, unitResult, referenceContext); |
116 |
referenceContext.tagAsHavingErrors(); |
117 |
// we might want to filter other non jls mandatory errors |
117 |
|
118 |
switch(problemId) { |
118 |
// should abort ? |
119 |
case IProblem.UnusedImport : |
119 |
int abortLevel; |
120 |
case IProblem.NonExternalizedStringLiteral : |
120 |
if ((abortLevel = |
121 |
break; |
121 |
(this.policy.stopOnFirstError() ? AbortCompilation : severity & Abort)) != 0) { |
122 |
default: |
122 |
|
123 |
referenceContext.tagAsHavingErrors(); |
123 |
referenceContext.abort(abortLevel, problem); |
124 |
|
|
|
125 |
// should abort ? |
126 |
int abortLevel; |
127 |
if ((abortLevel = |
128 |
(this.policy.stopOnFirstError() ? AbortCompilation : severity & Abort)) != 0) { |
129 |
|
130 |
referenceContext.abort(abortLevel, problem); |
131 |
} |
124 |
} |
132 |
} |
125 |
break; |
133 |
break; |
126 |
case Warning : |
134 |
case Warning : |