langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
equal
deleted
inserted
replaced
154 * @param d diagnostic whose arguments are to be formatted |
154 * @param d diagnostic whose arguments are to be formatted |
155 * @param l locale object to be used for i18n |
155 * @param l locale object to be used for i18n |
156 * @return a Collection whose elements are the formatted arguments of the diagnostic |
156 * @return a Collection whose elements are the formatted arguments of the diagnostic |
157 */ |
157 */ |
158 protected Collection<String> formatArguments(JCDiagnostic d, Locale l) { |
158 protected Collection<String> formatArguments(JCDiagnostic d, Locale l) { |
159 ListBuffer<String> buf = new ListBuffer<String>(); |
159 ListBuffer<String> buf = new ListBuffer<>(); |
160 for (Object o : d.getArgs()) { |
160 for (Object o : d.getArgs()) { |
161 buf.append(formatArgument(d, o, l)); |
161 buf.append(formatArgument(d, o, l)); |
162 } |
162 } |
163 return buf.toList(); |
163 return buf.toList(); |
164 } |
164 } |
387 protected Map<MultilineLimit, Integer> multilineLimits; |
387 protected Map<MultilineLimit, Integer> multilineLimits; |
388 protected EnumSet<DiagnosticPart> visibleParts; |
388 protected EnumSet<DiagnosticPart> visibleParts; |
389 protected boolean caretEnabled; |
389 protected boolean caretEnabled; |
390 |
390 |
391 public SimpleConfiguration(Set<DiagnosticPart> parts) { |
391 public SimpleConfiguration(Set<DiagnosticPart> parts) { |
392 multilineLimits = new HashMap<MultilineLimit, Integer>(); |
392 multilineLimits = new HashMap<>(); |
393 setVisible(parts); |
393 setVisible(parts); |
394 setMultilineLimit(MultilineLimit.DEPTH, -1); |
394 setMultilineLimit(MultilineLimit.DEPTH, -1); |
395 setMultilineLimit(MultilineLimit.LENGTH, -1); |
395 setMultilineLimit(MultilineLimit.LENGTH, -1); |
396 setCaretEnabled(true); |
396 setCaretEnabled(true); |
397 } |
397 } |