1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 01:36:01 +02:00

Remove deadcode parse() and trim() the string.

This commit is contained in:
Alain Magloire 2002-11-07 03:19:25 +00:00
parent f1009943f6
commit 734cfe23ea

View file

@ -5,10 +5,8 @@ package org.eclipse.cdt.core;
* All Rights Reserved. * All Rights Reserved.
*/ */
import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.StringReader;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
@ -194,32 +192,6 @@ public class ErrorParserManager extends OutputStream {
/** /**
* Parses the input and try to generate error or warning markers * Parses the input and try to generate error or warning markers
*/ */
public void parse(String output) {
BufferedReader rd = new BufferedReader(new StringReader(output));
try {
String line = rd.readLine();
while (line != null) {
line = line.trim();
processLine(line);
previousLine = line;
line = rd.readLine();
}
}
catch (IOException e) {
CCorePlugin.log(e);
}
finally {
try {
rd.close();
}
catch (IOException e) {
}
}
fDirectoryStack.removeAllElements();
fBaseDirectory = null;
}
private void processLine(String line) { private void processLine(String line) {
int top = fErrorParsers.size() - 1; int top = fErrorParsers.size() - 1;
int i = top; int i = top;
@ -369,6 +341,8 @@ public class ErrorParserManager extends OutputStream {
private void checkLine() { private void checkLine() {
String line = currentLine.toString(); String line = currentLine.toString();
if (line.endsWith("\n")) { if (line.endsWith("\n")) {
// Remove the training new lines.
line = line.trim();
processLine(line); processLine(line);
previousLine = line; previousLine = line;
currentLine.setLength(0); currentLine.setLength(0);