src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java

changeset 137
e4eaddca54b7
parent 136
8eafba4f61be
child 168
4cdaaf4c5dca
     1.1 --- a/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java	Thu Oct 09 16:07:38 2008 +0100
     1.2 +++ b/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java	Thu Oct 09 16:19:13 2008 +0100
     1.3 @@ -41,8 +41,8 @@
     1.4       * Create a formatter based on the supplied options.
     1.5       * @param msgs
     1.6       */
     1.7 -    public RawDiagnosticFormatter(JavacMessages msgs) {
     1.8 -        super(null);
     1.9 +    public RawDiagnosticFormatter(Options opts) {
    1.10 +        super(null, opts, false);
    1.11      }
    1.12  
    1.13      //provide common default formats
    1.14 @@ -61,6 +61,8 @@
    1.15                  buf.append('-');
    1.16              buf.append(' ');
    1.17              buf.append(formatMessage(d, null));
    1.18 +            if (displaySource(d))
    1.19 +                buf.append("\n" + formatSourceLine(d));
    1.20              return buf.toString();
    1.21          }
    1.22          catch (Exception e) {
    1.23 @@ -94,8 +96,4 @@
    1.24          }
    1.25          return buf.toString();
    1.26      }
    1.27 -
    1.28 -    public boolean displaySource(JCDiagnostic d) {
    1.29 -        return false;
    1.30 -    }
    1.31  }

mercurial