mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Remove usage of ErrorParserManager
This commit is contained in:
parent
5ac21f1de1
commit
d9d7fd0d07
2 changed files with 4 additions and 19 deletions
|
@ -425,7 +425,7 @@ public class BuildRunnerHelper implements Closeable {
|
|||
if (consoleInfo != null) {
|
||||
toConsole(goodbye);
|
||||
} else {
|
||||
// FIXME in current flow goodbye() can be called after close(), that is a problem with design of BuildRunnerHelper
|
||||
// in current flow goodbye() can be called after close()
|
||||
try {
|
||||
consoleInfo = console.getInfoStream();
|
||||
toConsole(goodbye);
|
||||
|
|
|
@ -14,9 +14,7 @@ import java.io.IOException;
|
|||
import java.io.OutputStream;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.ErrorParserManager;
|
||||
import org.eclipse.cdt.core.IConsoleParser;
|
||||
import org.eclipse.cdt.core.IErrorParser;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -119,8 +117,6 @@ public class ConsoleOutputSniffer {
|
|||
private OutputStream consoleErrorStream;
|
||||
private IConsoleParser[] parsers;
|
||||
|
||||
private ErrorParserManager errorParserManager = null;
|
||||
|
||||
public ConsoleOutputSniffer(IConsoleParser[] parsers) {
|
||||
this.parsers = parsers;
|
||||
}
|
||||
|
@ -131,11 +127,6 @@ public class ConsoleOutputSniffer {
|
|||
this.consoleErrorStream = errorStream;
|
||||
}
|
||||
|
||||
public ConsoleOutputSniffer(OutputStream outputStream, OutputStream errorStream, IConsoleParser[] parsers, ErrorParserManager epm) {
|
||||
this(outputStream, errorStream, parsers);
|
||||
this.errorParserManager = epm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an output stream that will be sniffed.
|
||||
* This stream should be hooked up so the command
|
||||
|
@ -168,9 +159,8 @@ public class ConsoleOutputSniffer {
|
|||
try {
|
||||
parsers[i].shutdown();
|
||||
} catch (Throwable e) {
|
||||
// Report exception if any but let all the parsers chance to shutdown.
|
||||
// Report exception if any but let all the parsers a chance to shutdown.
|
||||
CCorePlugin.log(e);
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,13 +174,8 @@ public class ConsoleOutputSniffer {
|
|||
private synchronized void processLine(String line) {
|
||||
for (IConsoleParser parser : parsers) {
|
||||
try {
|
||||
if (parser instanceof IErrorParser) {
|
||||
// IErrorParser interface is used here only with purpose to pass ErrorParserManager
|
||||
// which keeps track of CWD and provides useful methods for locating files
|
||||
((IErrorParser)parser).processLine(line, errorParserManager);
|
||||
} else {
|
||||
// Report exception if any but let all the parsers a chance to process the line.
|
||||
parser.processLine(line);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
CCorePlugin.log(e);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue