diff options
author | Alain Magloire | 2004-11-02 03:28:10 +0000 |
---|---|---|
committer | Alain Magloire | 2004-11-02 03:28:10 +0000 |
commit | b39a005df06483bf727cfbfbcef0a5c9d59f1bab (patch) | |
tree | cf4dd43ed952b1020450d7400386d4266a19825b | |
parent | c8918580402cfa624a7aba8e85469a9bbfdedb65 (diff) | |
download | org.eclipse.cdt-b39a005df06483bf727cfbfbcef0a5c9d59f1bab.tar.gz org.eclipse.cdt-b39a005df06483bf727cfbfbcef0a5c9d59f1bab.tar.xz org.eclipse.cdt-b39a005df06483bf727cfbfbcef0a5c9d59f1bab.zip |
2004-11-01 Alain Magloire
Change to the errorParserManager, ... finally
- do no reorder the arbitrary the error parsers array
- if IErrorParser.processLine() return true bail out.
* src/org/eclipse/cdt/core/ErrorParserManager.java
* plugin.xml
-rw-r--r-- | core/org.eclipse.cdt.core/ChangeLog | 9 | ||||
-rw-r--r-- | core/org.eclipse.cdt.core/plugin.xml | 16 | ||||
-rw-r--r-- | core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java | 43 |
3 files changed, 45 insertions, 23 deletions
diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index dfcc25d8ecd..a964906208e 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -1,3 +1,12 @@ +2004-11-01 Alain Magloire + + Change to the errorParserManager, ... finally + - do no reorder the arbitrary the error parsers array + - if IErrorParser.processLine() return true bail out. + + * src/org/eclipse/cdt/core/ErrorParserManager.java + * plugin.xml + 2004-10-14 David Inglis Move BinaryConfig into internal.model was no need to be public, also fixed it to diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml index 297fb830a50..d8af73975e4 100644 --- a/core/org.eclipse.cdt.core/plugin.xml +++ b/core/org.eclipse.cdt.core/plugin.xml @@ -155,6 +155,14 @@ <!-- Define the list of Error Parser provided by the CDT --> <!-- =================================================================================== --> <extension + id="MakeErrorParser" + name="%CDTGNUMakeErrorParser.name" + point="org.eclipse.cdt.core.ErrorParser"> + <errorparser + class="org.eclipse.cdt.internal.errorparsers.MakeErrorParser"> + </errorparser> + </extension> + <extension id="GCCErrorParser" name="%CDTGNUCErrorParser.name" point="org.eclipse.cdt.core.ErrorParser"> @@ -179,14 +187,6 @@ </errorparser> </extension> <extension - id="MakeErrorParser" - name="%CDTGNUMakeErrorParser.name" - point="org.eclipse.cdt.core.ErrorParser"> - <errorparser - class="org.eclipse.cdt.internal.errorparsers.MakeErrorParser"> - </errorparser> - </extension> - <extension id="VCErrorParser" name="%CDTVisualCErrorParser.name" point="org.eclipse.cdt.core.ErrorParser"> diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java index 15b1acf699d..2efd2456915 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java @@ -11,6 +11,7 @@ import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Vector; @@ -66,7 +67,7 @@ public class ErrorParserManager extends OutputStream { if (parsersIDs == null) { enableAllParsers(); } else { - fErrorParsers = new HashMap(parsersIDs.length); + fErrorParsers = new LinkedHashMap(parsersIDs.length); for (int i = 0; i < parsersIDs.length; i++) { IErrorParser[] parsers = CCorePlugin.getDefault().getErrorParser(parsersIDs[i]); fErrorParsers.put(parsersIDs[i], parsers); @@ -104,7 +105,6 @@ public class ErrorParserManager extends OutputStream { return (IPath) fDirectoryStack.lastElement(); } // Fallback to the Project Location - // FIXME: if the build did not start in the Project ? return fBaseDirectory; } @@ -136,7 +136,7 @@ public class ErrorParserManager extends OutputStream { } private void enableAllParsers() { - fErrorParsers = new HashMap(); + fErrorParsers = new LinkedHashMap(); String[] parserIDs = CCorePlugin.getDefault().getAllErrorParsersIDs(); for (int i = 0; i < parserIDs.length; i++) { IErrorParser[] parsers = CCorePlugin.getDefault().getErrorParser(parserIDs[i]); @@ -185,24 +185,37 @@ public class ErrorParserManager extends OutputStream { parserIDs[i] = (String) items.next(); } - int top = parserIDs.length - 1; - int i = top; - do { - IErrorParser[] parsers = (IErrorParser[]) fErrorParsers.get(parserIDs[i]); + for (int i = 0; i <parserIDs.length; ++i) { + IErrorParser[] parsers = (IErrorParser[])fErrorParsers.get(parserIDs[i]); for (int j = 0; j < parsers.length; j++) { IErrorParser curr = parsers[j]; if (curr.processLine(line, this)) { - if (i != top) { - // move to top - Object used = fErrorParsers.remove(parserIDs[i]); - fErrorParsers.put(parserIDs[i], used); - //savePreferences(); - } return; } } - i--; - } while (i >= 0); + } + +// This old way of doing was trouble because it did not +// respect the ordering provide by the users. +// +// int top = parserIDs.length - 1; +// int i = top; +// do { +// IErrorParser[] parsers = (IErrorParser[]) fErrorParsers.get(parserIDs[i]); +// for (int j = 0; j < parsers.length; j++) { +// IErrorParser curr = parsers[j]; +// if (curr.processLine(line, this)) { +// if (i != top) { +// // move to top +// Object used = fErrorParsers.remove(parserIDs[i]); +// fErrorParsers.put(parserIDs[i], used); +// //savePreferences(); +// } +// return; +// } +// } +// i--; +// } while (i >= 0); } /** |