View | Details | Raw Unified | Return to bug 107332
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java (-9 / +13 lines)
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
			if (problemId != IProblem.UnusedImport) {
118
			// should abort ?
119
				referenceContext.tagAsHavingErrors();
119
			int abortLevel;
120
	
120
			if ((abortLevel = 
121
				// should abort ?
121
				(this.policy.stopOnFirstError() ? AbortCompilation : severity & Abort)) != 0) {
122
				int abortLevel;
122
123
				if ((abortLevel = 
123
				referenceContext.abort(abortLevel, problem);
124
					(this.policy.stopOnFirstError() ? AbortCompilation : severity & Abort)) != 0) {
125
	
126
					referenceContext.abort(abortLevel, problem);
127
				}
124
			}
128
			}
125
			break;
129
			break;
126
		case Warning :
130
		case Warning :

Return to bug 107332