String (@NotNull Document document, @NotNull String commentSuffix, @NotNull String commentPrefix, @NotNull String linePrefix, @NotNull TextRange commentRange) { final StringBuilder sb = new StringBuilder(); final int nFirstCommentLine = document.getLineNumber(commentRange.getStartOffset()); for (int i = 0; ; i++) { final String line = getCommentLine(i, nFirstCommentLine, document, commentSuffix, commentPrefix, linePrefix, commentRange); if (line == null) break; sb.append(line); } return sb.toString(); }