diff options
Diffstat (limited to 'org.eclipse.jdt.core/model/org/eclipse')
-rw-r--r-- | org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java | 69 | ||||
-rw-r--r-- | org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/messages.properties | 5 |
2 files changed, 34 insertions, 40 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java index 8736aed1f8..139f2fef4f 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java @@ -121,58 +121,53 @@ protected String problemsMessage() { int numFixed = fixedErrorCount + fixedWarningCount; if (numNew == 0 && numFixed == 0) return ""; //$NON-NLS-1$ + boolean displayBoth = numNew > 0 && numFixed > 0; StringBuffer buffer = new StringBuffer(); buffer.append('('); - if (numNew == 0) { - // (Fixed: x errors, y warnings) - buffer.append(Util.bind("build.fixedHeader")); //$NON-NLS-1$ - buffer.append(' '); - if (fixedErrorCount > 0) { - if (fixedErrorCount == 1) - buffer.append(Util.bind("build.oneError")); //$NON-NLS-1$ - else - buffer.append(Util.bind("build.multipleErrors", String.valueOf(fixedErrorCount))); //$NON-NLS-1$ - if (fixedWarningCount > 0) - buffer.append(',').append(' '); - } - if (fixedWarningCount > 0) { - if (fixedWarningCount == 1) - buffer.append(Util.bind("build.oneWarning")); //$NON-NLS-1$ - else - buffer.append(Util.bind("build.multipleWarnings", String.valueOf(fixedWarningCount))); //$NON-NLS-1$ - } - } else if (numFixed == 0) { - // (Found: x errors, y warnings) + if (numNew > 0) { + // (Found x errors + y warnings) buffer.append(Util.bind("build.foundHeader")); //$NON-NLS-1$ buffer.append(' '); - if (newErrorCount > 0) { + if (displayBoth || newErrorCount > 0) { if (newErrorCount == 1) buffer.append(Util.bind("build.oneError")); //$NON-NLS-1$ else buffer.append(Util.bind("build.multipleErrors", String.valueOf(newErrorCount))); //$NON-NLS-1$ - if (newWarningCount > 0) - buffer.append(',').append(' '); + if (displayBoth || newWarningCount > 0) + buffer.append(" + "); //$NON-NLS-1$ } - if (newWarningCount > 0) { + if (displayBoth || newWarningCount > 0) { if (newWarningCount == 1) buffer.append(Util.bind("build.oneWarning")); //$NON-NLS-1$ else buffer.append(Util.bind("build.multipleWarnings", String.valueOf(newWarningCount))); //$NON-NLS-1$ } - } else { - // (Found/fixed: x/y errors, x/y warnings) - buffer.append(Util.bind("build.foundFixedHeader")); //$NON-NLS-1$ + if (numFixed > 0) + buffer.append(", "); //$NON-NLS-1$ + } + if (numFixed > 0) { + // (Fixed x errors + y warnings) or (Found x errors + y warnings, Fixed x + y) + buffer.append(Util.bind("build.fixedHeader")); //$NON-NLS-1$ buffer.append(' '); - - if (newErrorCount > 0 || fixedErrorCount > 0) { - String plusMinus = String.valueOf(newErrorCount) + "/" + String.valueOf(fixedErrorCount); //$NON-NLS-1$ - buffer.append(Util.bind("build.multipleErrors", plusMinus)); //$NON-NLS-1$ - if (fixedWarningCount > 0 || newWarningCount > 0) - buffer.append(',').append(' '); - } - if (newWarningCount > 0 || fixedWarningCount > 0) { - String plusMinus = String.valueOf(newWarningCount) + "/" + String.valueOf(fixedWarningCount); //$NON-NLS-1$ - buffer.append(Util.bind("build.multipleWarnings", plusMinus)); //$NON-NLS-1$ + if (displayBoth) { + buffer.append(String.valueOf(fixedErrorCount)); + buffer.append(" + "); //$NON-NLS-1$ + buffer.append(String.valueOf(fixedWarningCount)); + } else { + if (fixedErrorCount > 0) { + if (fixedErrorCount == 1) + buffer.append(Util.bind("build.oneError")); //$NON-NLS-1$ + else + buffer.append(Util.bind("build.multipleErrors", String.valueOf(fixedErrorCount))); //$NON-NLS-1$ + if (fixedWarningCount > 0) + buffer.append(" + "); //$NON-NLS-1$ + } + if (fixedWarningCount > 0) { + if (fixedWarningCount == 1) + buffer.append(Util.bind("build.oneWarning")); //$NON-NLS-1$ + else + buffer.append(Util.bind("build.multipleWarnings", String.valueOf(fixedWarningCount))); //$NON-NLS-1$ + } } } buffer.append(')'); diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/messages.properties b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/messages.properties index f34f518c94..20f2d51994 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/messages.properties +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/messages.properties @@ -73,9 +73,8 @@ build.analyzingSources = Analyzing sources build.cleaningOutput = Cleaning output folder build.copyingResources = Copying resources to the output folder build.compiling = Compiling {0} -build.foundHeader = Found: -build.fixedHeader = Fixed: -build.foundFixedHeader = Found/fixed: +build.foundHeader = Found +build.fixedHeader = Fixed build.oneError = 1 error build.oneWarning = 1 warning build.multipleErrors = {0} errors |