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

(-)src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseMessagerImpl.java (-3 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 BEA Systems, Inc. 
2
 * Copyright (c) 2007, 2011 BEA Systems, Inc. 
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 7-13 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *    wharley@bea.com - derived base class from BatchMessagerImpl
9
 *    wharley@bea.com - derived base class from BatchMessagerImpl
10
 *    
10
 *    IBM Corporation - fix for 342600
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.jdt.internal.compiler.apt.dispatch;
12
package org.eclipse.jdt.internal.compiler.apt.dispatch;
13
13
Lines 186-193 Link Here
186
			case ERROR :
186
			case ERROR :
187
				severity = ProblemSeverities.Error;
187
				severity = ProblemSeverities.Error;
188
				break;
188
				break;
189
			case NOTE :
190
				severity = ProblemSeverities.Note;
191
				break;
189
			default :
192
			default :
190
				// There is no "INFO" equivalent in JDT
193
				// WARNING / MANDATORY_WARNING / OTHER
191
				severity = ProblemSeverities.Warning;
194
				severity = ProblemSeverities.Warning;
192
				break;
195
				break;
193
		}
196
		}
(-)batch/org/eclipse/jdt/internal/compiler/batch/Main.java (-29 / +46 lines)
Lines 569-606 Link Here
569
569
570
		private void logExtraProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount) {
570
		private void logExtraProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount) {
571
			char[] originatingFileName = problem.getOriginatingFileName();
571
			char[] originatingFileName = problem.getOriginatingFileName();
572
			String fileName =
572
			if (originatingFileName == null) {
573
				originatingFileName == null
573
				// simplified message output
574
				? this.main.bind("requestor.noFileNameSpecified")//$NON-NLS-1$
574
				if (problem.isError()) {
575
				: new String(originatingFileName);
575
					printErr(this.main.bind(
576
			if ((this.tagBits & Logger.EMACS) != 0) {
576
								"requestor.extraerror", //$NON-NLS-1$
577
				String result = fileName
577
								Integer.toString(globalErrorCount)));
578
						+ ":" //$NON-NLS-1$
578
				} else if (problem.isNote()) {
579
						+ problem.getSourceLineNumber()
579
					printErr(this.main.bind(
580
						+ ": " //$NON-NLS-1$
580
							"requestor.extrainfo", //$NON-NLS-1$
581
						+ (problem.isError() ? this.main.bind("output.emacs.error") : this.main.bind("output.emacs.warning")) //$NON-NLS-1$ //$NON-NLS-2$
581
							Integer.toString(globalErrorCount)));
582
						+ ": " //$NON-NLS-1$
582
				} else {
583
						+ problem.getMessage();
583
					// warning / mandatory warning / other
584
				this.printlnErr(result);
584
					printErr(this.main.bind(
585
				final String errorReportSource = errorReportSource(problem, null, this.tagBits);
585
							"requestor.extrawarning", //$NON-NLS-1$
586
				this.printlnErr(errorReportSource);
586
							Integer.toString(globalErrorCount)));
587
				}
588
				printErr(" "); //$NON-NLS-1$
589
				this.printlnErr(problem.getMessage());
587
			} else {
590
			} else {
588
				if (localErrorCount == 0) {
591
				String fileName = new String(originatingFileName);
592
				if ((this.tagBits & Logger.EMACS) != 0) {
593
					String result = fileName
594
							+ ":" //$NON-NLS-1$
595
							+ problem.getSourceLineNumber()
596
							+ ": " //$NON-NLS-1$
597
							+ (problem.isError() ? this.main.bind("output.emacs.error") : this.main.bind("output.emacs.warning")) //$NON-NLS-1$ //$NON-NLS-2$
598
							+ ": " //$NON-NLS-1$
599
							+ problem.getMessage();
600
					this.printlnErr(result);
601
					final String errorReportSource = errorReportSource(problem, null, this.tagBits);
602
					this.printlnErr(errorReportSource);
603
				} else {
604
					if (localErrorCount == 0) {
605
						this.printlnErr("----------"); //$NON-NLS-1$
606
					}
607
					printErr(problem.isError() ?
608
							this.main.bind(
609
									"requestor.error", //$NON-NLS-1$
610
									Integer.toString(globalErrorCount),
611
									new String(fileName))
612
									: this.main.bind(
613
											"requestor.warning", //$NON-NLS-1$
614
											Integer.toString(globalErrorCount),
615
											new String(fileName)));
616
					final String errorReportSource = errorReportSource(problem, null, 0);
617
					this.printlnErr(errorReportSource);
618
					this.printlnErr(problem.getMessage());
589
					this.printlnErr("----------"); //$NON-NLS-1$
619
					this.printlnErr("----------"); //$NON-NLS-1$
590
				}
620
				}
591
				printErr(problem.isError() ?
592
						this.main.bind(
593
								"requestor.error", //$NON-NLS-1$
594
								Integer.toString(globalErrorCount),
595
								new String(fileName))
596
								: this.main.bind(
597
										"requestor.warning", //$NON-NLS-1$
598
										Integer.toString(globalErrorCount),
599
										new String(fileName)));
600
				final String errorReportSource = errorReportSource(problem, null, 0);
601
				this.printlnErr(errorReportSource);
602
				this.printlnErr(problem.getMessage());
603
				this.printlnErr("----------"); //$NON-NLS-1$
604
			}
621
			}
605
		}
622
		}
606
623
(-)batch/org/eclipse/jdt/internal/compiler/batch/messages.properties (+3 lines)
Lines 104-109 Link Here
104
### requestor
104
### requestor
105
requestor.error = {0}. ERROR in {1}
105
requestor.error = {0}. ERROR in {1}
106
requestor.warning = {0}. WARNING in {1}
106
requestor.warning = {0}. WARNING in {1}
107
requestor.extraerror = {0}. Error:
108
requestor.extrawarning = {0}. Warning:
109
requestor.extrainfo = Note:
107
requestor.notRetrieveErrorMessage = Cannot retrieve the error message for {0}
110
requestor.notRetrieveErrorMessage = Cannot retrieve the error message for {0}
108
requestor.noFileNameSpecified = (original file name is not available)
111
requestor.noFileNameSpecified = (original file name is not available)
109
112
(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (+8 lines)
Lines 211-216 Link Here
211
boolean isWarning();
211
boolean isWarning();
212
212
213
/**
213
/**
214
 * Checks the severity to see if the Note bit is set.
215
 *
216
 * @return true if the Note bit is set for the severity, false otherwise
217
 * @since 3.7
218
 */
219
boolean isNote();
220
221
/**
214
 * Set the end position of the problem (inclusive), or -1 if unknown.
222
 * Set the end position of the problem (inclusive), or -1 if unknown.
215
 * Used for shifting problem positions.
223
 * Used for shifting problem positions.
216
 *
224
 *
(-)compiler/org/eclipse/jdt/internal/compiler/problem/DefaultProblem.java (-1 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 242-247 Link Here
242
	return (this.severity & ProblemSeverities.Error) == 0;
242
	return (this.severity & ProblemSeverities.Error) == 0;
243
}
243
}
244
244
245
public boolean isNote() {
246
	return (this.severity & ProblemSeverities.Note) != 0;
247
}
248
245
public void setOriginatingFileName(char[] fileName) {
249
public void setOriginatingFileName(char[] fileName) {
246
	this.fileName = fileName;
250
	this.fileName = fileName;
247
}
251
}
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemSeverities.java (-1 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 14-19 Link Here
14
14
15
	final int Ignore = 256; // during handling only
15
	final int Ignore = 256; // during handling only
16
	final int Warning = 0; // during handling only
16
	final int Warning = 0; // during handling only
17
	final int Note = 512; // during handling only
17
18
18
	final int Error = 1; // when bit is set: problem is error, if not it is a warning
19
	final int Error = 1; // when bit is set: problem is error, if not it is a warning
19
	final int AbortCompilation = 2;
20
	final int AbortCompilation = 2;
(-)src/org/eclipse/jdt/core/tests/builder/ParticipantBuildTests.java (-1 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 61-66 Link Here
61
		public int getSourceLineNumber() { return 1; }
61
		public int getSourceLineNumber() { return 1; }
62
		public boolean isError() { return true; }
62
		public boolean isError() { return true; }
63
		public boolean isWarning() { return false; }
63
		public boolean isWarning() { return false; }
64
		public boolean isNote() { return false; }
64
		public void setSourceEnd(int sourceEnd) {/* not needed */}
65
		public void setSourceEnd(int sourceEnd) {/* not needed */}
65
		public void setSourceLineNumber(int lineNumber)  {/* not needed */}
66
		public void setSourceLineNumber(int lineNumber)  {/* not needed */}
66
		public void setSourceStart(int sourceStart) {/* not needed */}
67
		public void setSourceStart(int sourceStart) {/* not needed */}
(-)ui/org/eclipse/jdt/internal/ui/text/spelling/CoreSpellingProblem.java (-1 / +8 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 157-162 Link Here
157
	}
157
	}
158
158
159
	/*
159
	/*
160
	 * @see org.eclipse.jdt.core.compiler.IProblem#isInfo()
161
	 */
162
	public boolean isNote() {
163
		return false;
164
	}
165
	
166
	/*
160
	 * @see org.eclipse.jdt.core.compiler.IProblem#setSourceStart(int)
167
	 * @see org.eclipse.jdt.core.compiler.IProblem#setSourceStart(int)
161
	 */
168
	 */
162
	public void setSourceStart(int sourceStart) {
169
	public void setSourceStart(int sourceStart) {

Return to bug 342600