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

changeset 136
8eafba4f61be
parent 100
37551dc0f591
child 168
4cdaaf4c5dca
equal deleted inserted replaced
135:ac6ce899d007 136:8eafba4f61be
62 DiagnosticFormatter<JCDiagnostic> formatter; 62 DiagnosticFormatter<JCDiagnostic> formatter;
63 final String prefix; 63 final String prefix;
64 64
65 /** Create a new diagnostic factory. */ 65 /** Create a new diagnostic factory. */
66 protected Factory(Context context) { 66 protected Factory(Context context) {
67 this(Messages.instance(context), "compiler"); 67 this(JavacMessages.instance(context), "compiler");
68 context.put(diagnosticFactoryKey, this); 68 context.put(diagnosticFactoryKey, this);
69 } 69 }
70 70
71 /** Create a new diagnostic factory. */ 71 /** Create a new diagnostic factory. */
72 public Factory(Messages messages, String prefix) { 72 public Factory(JavacMessages messages, String prefix) {
73 this.prefix = prefix; 73 this.prefix = prefix;
74 this.formatter = new BasicDiagnosticFormatter(messages); 74 this.formatter = new BasicDiagnosticFormatter(messages);
75 } 75 }
76 76
77 /** 77 /**
176 } 176 }
177 //where 177 //where
178 @Deprecated 178 @Deprecated
179 public static DiagnosticFormatter<JCDiagnostic> getFragmentFormatter() { 179 public static DiagnosticFormatter<JCDiagnostic> getFragmentFormatter() {
180 if (fragmentFormatter == null) { 180 if (fragmentFormatter == null) {
181 fragmentFormatter = new BasicDiagnosticFormatter(Messages.getDefaultMessages()); 181 fragmentFormatter = new BasicDiagnosticFormatter(JavacMessages.getDefaultMessages());
182 } 182 }
183 return fragmentFormatter; 183 return fragmentFormatter;
184 } 184 }
185 185
186 /** 186 /**

mercurial