public Locale getLocale() { return messages.getCurrentLocale(); }
public Locale getLocale() { return messages.getCurrentLocale(); }
public String formatDiagnostic(JCDiagnostic d, Locale l) { if (l == null) l = messages.getCurrentLocale(); String format = selectFormat(d); StringBuilder buf = new StringBuilder(); for (int i = 0; i < format.length(); i++) { char c = format.charAt(i); boolean meta = false; if (c == '%' && i < format.length() - 1) { meta = true; c = format.charAt(++i); } buf.append(meta ? formatMeta(c, d, l) : String.valueOf(c)); } if (depth == 0) return addSourceLineIfNeeded(d, buf.toString()); else return buf.toString(); }
public String formatDiagnostic(JCDiagnostic d, Locale l) { if (l == null) l = messages.getCurrentLocale(); String format = selectFormat(d); StringBuilder buf = new StringBuilder(); for (int i = 0; i < format.length(); i++) { char c = format.charAt(i); boolean meta = false; if (c == '%' && i < format.length() - 1) { meta = true; c = format.charAt(++i); } buf.append(meta ? formatMeta(c, d, l) : String.valueOf(c)); } if (depth == 0) return addSourceLineIfNeeded(d, buf.toString()); else return buf.toString(); }
public String getLocalizedString(Locale l, String key, Object... args) { if (l == null) l = getCurrentLocale(); return getLocalizedString(getBundles(l), key, args); }
public String getLocalizedString(Locale l, String key, Object... args) { if (l == null) l = getCurrentLocale(); return getLocalizedString(getBundles(l), key, args); }
/** * Write out a diagnostic. */ protected void writeDiagnostic(JCDiagnostic diag) { if (diagListener != null) { diagListener.report(diag); return; } PrintWriter writer = getWriterForDiagnosticType(diag.getType()); printRawLines(writer, diagFormatter.format(diag, messages.getCurrentLocale())); if (promptOnError) { switch (diag.getType()) { case ERROR: case WARNING: prompt(); } } if (dumpOnError) new RuntimeException().printStackTrace(writer); writer.flush(); }
/** * Write out a diagnostic. */ protected void writeDiagnostic(JCDiagnostic diag) { if (diagListener != null) { diagListener.report(diag); return; } PrintWriter writer = getWriterForDiagnosticType(diag.getType()); printRawLines(writer, diagFormatter.format(diag, messages.getCurrentLocale())); if (promptOnError) { switch (diag.getType()) { case ERROR: case WARNING: prompt(); } } if (dumpOnError) new RuntimeException().printStackTrace(writer); writer.flush(); }