Methods Summary |
---|
protected boolean | getErrorFlag()Indicate if there were errors during the compile
return errorFlag;
|
private void | log(java.lang.String line)
if (!emacsMode) {
task.log("", (error ? Project.MSG_ERR : Project.MSG_WARN));
}
task.log(line, (error ? Project.MSG_ERR : Project.MSG_WARN));
|
private void | parseEmacsOutput(java.io.BufferedReader reader)
// This may change, if we add advanced parsing capabilities.
parseStandardOutput(reader);
|
protected void | parseOutput(java.io.BufferedReader reader)Parse the output of a jikes compiler
if (emacsMode) {
parseEmacsOutput(reader);
} else {
parseStandardOutput(reader);
}
|
private void | parseStandardOutput(java.io.BufferedReader reader)
String line;
String lower;
// We assume, that every output, jikes does, stands for an error/warning
// XXX
// Is this correct?
// TODO:
// A warning line, that shows code, which contains a variable
// error will cause some trouble. The parser should definitely
// be much better.
while ((line = reader.readLine()) != null) {
lower = line.toLowerCase();
if (line.trim().equals("")) {
continue;
}
if (lower.indexOf("error") != -1) {
setError(true);
} else if (lower.indexOf("warning") != -1) {
setError(false);
} else {
// If we don't know the type of the line
// and we are in emacs mode, it will be
// an error, because in this mode, jikes won't
// always print "error", but sometimes other
// keywords like "Syntax". We should look for
// all those keywords.
if (emacsMode) {
setError(true);
}
}
log(line);
}
|
private void | setError(boolean err)
error = err;
if (error) {
errorFlag = true;
}
|
public void | setProcessErrorStream(java.io.InputStream is)Ignore.
|
public void | setProcessInputStream(java.io.OutputStream os)Ignore.
// CheckStyle:VisibilityModifier ON
|
public void | setProcessOutputStream(java.io.InputStream is)Set the inputstream
br = new BufferedReader(new InputStreamReader(is));
|
public void | start()Invokes parseOutput.
parseOutput(br);
|
public void | stop()Ignore.
|