mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
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
This commit is contained in:
parent
c891858040
commit
b39a005df0
3 changed files with 45 additions and 23 deletions
|
@ -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
|
||||
|
|
|
@ -154,6 +154,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"
|
||||
|
@ -178,14 +186,6 @@
|
|||
class="org.eclipse.cdt.internal.errorparsers.GLDErrorParser">
|
||||
</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"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue