Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java

Issue 8476005: Support for --machine-problems, tests for PrettyErrorFormatter (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
diff --git a/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java b/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
index a13218ab76475a9f58318230bd44e09252f0b1d5..bd9a5a4b5a01fe7072383135c42cee568a1b99f3 100644
--- a/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
+++ b/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
@@ -33,16 +33,17 @@ public class DefaultDartCompilerListener extends DartCompilerListener {
* Formatter used to report error messages. Marked protected so that
* subclasses can override it (e.g. for a test server using HTML formatting).
*/
- protected ErrorFormatter formatter = new PrettyErrorFormatter(useColor());
+ protected final ErrorFormatter formatter;
- public DefaultDartCompilerListener() {
+ public DefaultDartCompilerListener(boolean printMachineProblems) {
+ this(System.err, printMachineProblems);
}
/**
* @param outputStream the {@link PrintStream} to use for {@link ErrorFormatter}.
*/
- public DefaultDartCompilerListener(PrintStream outputStream) {
- ((PrettyErrorFormatter) formatter).setOutputStream(outputStream);
+ public DefaultDartCompilerListener(PrintStream outputStream, boolean printMachineProblems) {
+ formatter = new PrettyErrorFormatter(outputStream, useColor(), printMachineProblems);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698