String (@NotNull List<? extends HighlightInfo> infos) { return StreamEx.of(infos) .filter(info -> info.getSeverity() != HighlightInfoType.SYMBOL_TYPE_SEVERITY) .map(info -> { List<String> s = new ArrayList<>(); info.findRegisteredQuickFix((descriptor, range) -> { s.add(range + " " + descriptor); return null; }); String fixes = StreamEx.of(s) .mapLastOrElse("|- "::concat, "\\- "::concat) .map(str -> " " + str + "\n") .joining(); return info.getSeverity() + ": (" + info.getStartOffset() + "," + info.getEndOffset() + ") '" + info.getText() + "': " + info.getDescription() + "\n" + fixes; }) .joining(" "); }