public JavacFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset) {
return getStandardFileManager(null, diagnosticListener, locale, charset);
}
public JavacFileManager getStandardFileManager(Writer out, DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset) {
Context context = new Context();
if (diagnosticListener != null)
context.put(DiagnosticListener.class, diagnosticListener);
// make sure we set the out before someone else sets a default one, or uses one
if (context.get(Log.outKey) == null) {
if (out == null)
context.put(Log.outKey, new PrintWriter(System.err, true));
else
context.put(Log.outKey, new PrintWriter(out, true));
}
CeylonLog.preRegister(context);
return new CeyloncFileManager(context, true, charset);
}