136:8eafba4f61be | 137:e4eaddca54b7 |
---|---|
39 | 39 |
40 /** | 40 /** |
41 * Create a formatter based on the supplied options. | 41 * Create a formatter based on the supplied options. |
42 * @param msgs | 42 * @param msgs |
43 */ | 43 */ |
44 public RawDiagnosticFormatter(JavacMessages msgs) { | 44 public RawDiagnosticFormatter(Options opts) { |
45 super(null); | 45 super(null, opts, false); |
46 } | 46 } |
47 | 47 |
48 //provide common default formats | 48 //provide common default formats |
49 public String format(JCDiagnostic d, Locale l) { | 49 public String format(JCDiagnostic d, Locale l) { |
50 try { | 50 try { |
59 } | 59 } |
60 else | 60 else |
61 buf.append('-'); | 61 buf.append('-'); |
62 buf.append(' '); | 62 buf.append(' '); |
63 buf.append(formatMessage(d, null)); | 63 buf.append(formatMessage(d, null)); |
64 if (displaySource(d)) | |
65 buf.append("\n" + formatSourceLine(d)); | |
64 return buf.toString(); | 66 return buf.toString(); |
65 } | 67 } |
66 catch (Exception e) { | 68 catch (Exception e) { |
67 e.printStackTrace(); | 69 e.printStackTrace(); |
68 return null; | 70 return null; |
92 buf.append(o); | 94 buf.append(o); |
93 sep = ", "; | 95 sep = ", "; |
94 } | 96 } |
95 return buf.toString(); | 97 return buf.toString(); |
96 } | 98 } |
97 | |
98 public boolean displaySource(JCDiagnostic d) { | |
99 return false; | |
100 } | |
101 } | 99 } |