Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2007-05-24 18:32:24 +0000
committerDoug Schaefer2007-05-24 18:32:24 +0000
commitc19ba7a148f8dddbe2f4f692be7f09cca047f84a (patch)
tree4b7e6a0888863765e8e45807b68531301ceb61fa /core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers
parent1740bc2343e80bd2c1efcb07011c0d5c912e6bfd (diff)
downloadorg.eclipse.cdt-c19ba7a148f8dddbe2f4f692be7f09cca047f84a.tar.gz
org.eclipse.cdt-c19ba7a148f8dddbe2f4f692be7f09cca047f84a.tar.xz
org.eclipse.cdt-c19ba7a148f8dddbe2f4f692be7f09cca047f84a.zip
Bug 174142 - Fixed false error with linker error parser. Also cleaned up the messages to remove the warning and error words which are redundant in the Problems view.
Diffstat (limited to 'core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers')
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GCCErrorParser.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GLDErrorParser.java12
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/messages.properties4
3 files changed, 6 insertions, 16 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GCCErrorParser.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GCCErrorParser.java
index 8127e4d6f94..7b649370040 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GCCErrorParser.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GCCErrorParser.java
@@ -34,7 +34,7 @@ public class GCCErrorParser extends AbstractErrorParser {
new ErrorPattern(Messages.GCCErrorParser_skip_note),
new ErrorPattern(Messages.GCCErrorParser_sikp_instantiatedFromHere),
// The following are not...
- new ErrorPattern(Messages.GCCErrorParser_Warnings, 1, 2, 4, 0, 0) {
+ new ErrorPattern(Messages.GCCErrorParser_Warnings, 1, 2, 5, 0, 0) {
public String getVarName(Matcher matcher) {
String desc = getDesc(matcher);
Matcher varMatcher = null;
@@ -49,8 +49,8 @@ public class GCCErrorParser extends AbstractErrorParser {
return varMatcher != null ? varMatcher.group(1) : null;
}
public int getSeverity(Matcher matcher) {
- String warningGroup = matcher.group(5);
- if (warningGroup != null)
+ String warningGroup = matcher.group(4);
+ if (warningGroup == null || warningGroup.contains("arning"))
return IMarkerGenerator.SEVERITY_WARNING;
else
return IMarkerGenerator.SEVERITY_ERROR_RESOURCE;
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GLDErrorParser.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GLDErrorParser.java
index e9df1cb75ae..fd09a40b86a 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GLDErrorParser.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/GLDErrorParser.java
@@ -12,8 +12,6 @@
package org.eclipse.cdt.internal.errorparsers;
-import java.util.regex.Matcher;
-
import org.eclipse.cdt.core.IMarkerGenerator;
public class GLDErrorParser extends AbstractErrorParser {
@@ -21,15 +19,7 @@ public class GLDErrorParser extends AbstractErrorParser {
private static final ErrorPattern[] patterns = {
new ErrorPattern(Messages.GLDErrorParser_error_text, 1, 0, 2, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE), //$NON-NLS-1
new ErrorPattern(Messages.GLDErrorParser_warning_general, 2, IMarkerGenerator.SEVERITY_WARNING), //$NON-NLS-1
- new ErrorPattern(Messages.GLDErrorParser_error_general, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE) { //$NON-NLS-1
- public String getDesc(Matcher matcher) {
- // add in the name of the link command to give it some context
- StringBuffer buff = new StringBuffer();
- buff.append("ld: "); //$NON-NLS-1$
- buff.append(matcher.group(2));
- return buff.toString();
- }
- }
+ new ErrorPattern(Messages.GLDErrorParser_error_general, 2, IMarkerGenerator.SEVERITY_ERROR_RESOURCE) //$NON-NLS-1
};
public GLDErrorParser() {
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/messages.properties b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/messages.properties
index a3bb6a1888e..203f1bfad8d 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/messages.properties
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/messages.properties
@@ -16,9 +16,9 @@ GCCErrorParser_skip_UndeclaredOnlyOnce=\\(Each undeclared identifier is reported
GCCErrorParser_skip_forEachFunction=for each function it appears in.\\)
GCCErrorParser_skip_note=: note:
GCCErrorParser_sikp_instantiatedFromHere=instantiated from here
-GCCErrorParser_Warnings=(.*?):([0-9]+):([0-9]+:)? ((.*?[Ww]arning)?.*)
+GCCErrorParser_Warnings=(.*?):([0-9]+):([0-9]+:)?(.*?[([Ww]arning)([Ee]rror)]:?)? (.*)
GLDErrorParser_error_text=(.*)\\(\\.text\\+.*\\): (.*)
-GLDErrorParser_warning_general=ld(\\.exe)?: ([Ww]arning .*)
+GLDErrorParser_warning_general=ld(\\.exe)?: [Ww]arning:? (.*)
GLDErrorParser_error_general=ld(\\.exe)?: (.*)
MakeErrorParser_error_entering=make\\[(.*)\\]: Entering directory `(.*)'
MakeErrorParser_error_leaving=make\\[.*\\]: Leaving directory

Back to the top