### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v retrieving revision 1.363 diff -u -r1.363 Main.java --- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 15 Apr 2011 17:47:49 -0000 1.363 +++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2011 18:11:31 -0000 @@ -569,38 +569,51 @@ private void logExtraProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount) { char[] originatingFileName = problem.getOriginatingFileName(); - String fileName = - originatingFileName == null - ? this.main.bind("requestor.noFileNameSpecified")//$NON-NLS-1$ - : new String(originatingFileName); - if ((this.tagBits & Logger.EMACS) != 0) { - String result = fileName - + ":" //$NON-NLS-1$ - + problem.getSourceLineNumber() - + ": " //$NON-NLS-1$ - + (problem.isError() ? this.main.bind("output.emacs.error") : this.main.bind("output.emacs.warning")) //$NON-NLS-1$ //$NON-NLS-2$ - + ": " //$NON-NLS-1$ - + problem.getMessage(); - this.printlnErr(result); - final String errorReportSource = errorReportSource(problem, null, this.tagBits); - this.printlnErr(errorReportSource); + if (originatingFileName == null) { + // simplified message output + if (problem.isError()) { + printErr(this.main.bind( + "requestor.extraerror", //$NON-NLS-1$ + Integer.toString(globalErrorCount))); + } else { + // warning / mandatory warning / other + printErr(this.main.bind( + "requestor.extrawarning", //$NON-NLS-1$ + Integer.toString(globalErrorCount))); + } + printErr(" "); //$NON-NLS-1$ + this.printlnErr(problem.getMessage()); } else { - if (localErrorCount == 0) { + String fileName = new String(originatingFileName); + if ((this.tagBits & Logger.EMACS) != 0) { + String result = fileName + + ":" //$NON-NLS-1$ + + problem.getSourceLineNumber() + + ": " //$NON-NLS-1$ + + (problem.isError() ? this.main.bind("output.emacs.error") : this.main.bind("output.emacs.warning")) //$NON-NLS-1$ //$NON-NLS-2$ + + ": " //$NON-NLS-1$ + + problem.getMessage(); + this.printlnErr(result); + final String errorReportSource = errorReportSource(problem, null, this.tagBits); + this.printlnErr(errorReportSource); + } else { + if (localErrorCount == 0) { + this.printlnErr("----------"); //$NON-NLS-1$ + } + printErr(problem.isError() ? + this.main.bind( + "requestor.error", //$NON-NLS-1$ + Integer.toString(globalErrorCount), + new String(fileName)) + : this.main.bind( + "requestor.warning", //$NON-NLS-1$ + Integer.toString(globalErrorCount), + new String(fileName))); + final String errorReportSource = errorReportSource(problem, null, 0); + this.printlnErr(errorReportSource); + this.printlnErr(problem.getMessage()); this.printlnErr("----------"); //$NON-NLS-1$ } - printErr(problem.isError() ? - this.main.bind( - "requestor.error", //$NON-NLS-1$ - Integer.toString(globalErrorCount), - new String(fileName)) - : this.main.bind( - "requestor.warning", //$NON-NLS-1$ - Integer.toString(globalErrorCount), - new String(fileName))); - final String errorReportSource = errorReportSource(problem, null, 0); - this.printlnErr(errorReportSource); - this.printlnErr(problem.getMessage()); - this.printlnErr("----------"); //$NON-NLS-1$ } } Index: batch/org/eclipse/jdt/internal/compiler/batch/messages.properties =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties,v retrieving revision 1.972 diff -u -r1.972 messages.properties --- batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 21 Apr 2011 05:43:13 -0000 1.972 +++ batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 21 Apr 2011 18:11:31 -0000 @@ -104,6 +104,8 @@ ### requestor requestor.error = {0}. ERROR in {1} requestor.warning = {0}. WARNING in {1} +requestor.extraerror = {0}. Error: +requestor.extrawarning = {0}. Warning: requestor.notRetrieveErrorMessage = Cannot retrieve the error message for {0} requestor.noFileNameSpecified = (original file name is not available)