private static @Nullable String getCommentLine(int lineOffset,
                                                 int nFirstCommentLine,
                                                 @NotNull Document document,
                                                 @NotNull String commentSuffix,
                                                 @NotNull String commentPrefix,
                                                 @NotNull String linePrefix,
                                                 @NotNull TextRange commentRange) {
    if (lineOffset == 0) {
      final TextRange lineRange = getLineRange(document, nFirstCommentLine);
      return getCommentLine(document, lineRange, commentRange, commentPrefix, commentSuffix);
    }
    final int nCommentLine = nFirstCommentLine + lineOffset;
    if (nCommentLine >= document.getLineCount()) return null;

    final TextRange lineRange = getLineRange(document, nCommentLine);
    if (lineRange.getEndOffset() > commentRange.getEndOffset()) return null;

    return getCommentLine(document, lineRange, commentRange, linePrefix, commentSuffix);
  }
private static @Nullable String getCommentLine(int lineOffset,
                                                 int nFirstCommentLine,
                                                 @NotNull Document document,
                                                 @NotNull String commentSuffix,
                                                 @NotNull String commentPrefix,
                                                 @NotNull String linePrefix,
                                                 @NotNull TextRange commentRange)