| 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 51a6739f2e91d9ea68588010cd5cdf1a2260cf73..7b7be62275a2649c105af78e9bd007c08b5f5ccf 100644
|
| --- a/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
|
| +++ b/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
|
| @@ -13,7 +13,7 @@ import java.io.PrintStream;
|
| * A default implementation of {@link DartCompilerListener} which counts
|
| * compilation errors.
|
| */
|
| -public class DefaultDartCompilerListener extends DartCompilerListener {
|
| +public class DefaultDartCompilerListener implements DartCompilerListener {
|
|
|
| /**
|
| * The number of (fatal) problems that occurred during compilation.
|
| @@ -47,18 +47,6 @@ public class DefaultDartCompilerListener extends DartCompilerListener {
|
| formatter = new PrettyErrorFormatter(outputStream, useColor(), errorFormat);
|
| }
|
|
|
| - @Override
|
| - public void onError(DartCompilationError event) {
|
| - formatter.format(event);
|
| - if (event.getErrorCode().getSubSystem() == SubSystem.STATIC_TYPE) {
|
| - incrementTypeErrorCount();
|
| - } else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.ERROR) {
|
| - incrementErrorCount();
|
| - } else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.WARNING) {
|
| - incrementWarningCount();
|
| - }
|
| - }
|
| -
|
| private boolean useColor() {
|
| return String.valueOf(System.getenv("TERM")).startsWith("xterm") && System.console() != null;
|
| }
|
| @@ -112,6 +100,22 @@ public class DefaultDartCompilerListener extends DartCompilerListener {
|
| }
|
|
|
| @Override
|
| + public void onError(DartCompilationError event) {
|
| + formatter.format(event);
|
| + if (event.getErrorCode().getSubSystem() == SubSystem.STATIC_TYPE) {
|
| + incrementTypeErrorCount();
|
| + } else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.ERROR) {
|
| + incrementErrorCount();
|
| + } else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.WARNING) {
|
| + incrementWarningCount();
|
| + }
|
| + }
|
| +
|
| + @Override
|
| + public void unitAboutToCompile(DartSource source, boolean diet) {
|
| + }
|
| +
|
| + @Override
|
| public void unitCompiled(DartUnit unit) {
|
| }
|
| }
|
|
|