public static @Nullable TextRange getBlockCommentRange(int selectionStart,
                                                         int selectionEnd,
                                                         @NotNull Document document,
                                                         @NotNull String prefix,
                                                         @NotNull String suffix) {
    CharSequence sequence = document.getCharsSequence();
    selectionStart = CharArrayUtil.shiftForward(sequence, selectionStart, " \t\n");
    selectionEnd = CharArrayUtil.shiftBackward(sequence, selectionEnd - 1, " \t\n") + 1;

    if (selectionEnd < selectionStart) {
      selectionEnd = selectionStart;
    }

    if (CharArrayUtil.regionMatches(sequence, selectionEnd - suffix.length(), suffix) &&
        CharArrayUtil.regionMatches(sequence, selectionStart, prefix)) {
      return new TextRange(selectionStart, selectionEnd);
    }
    return null;
  }
public static @Nullable TextRange getBlockCommentRange(int selectionStart,
                                                         int selectionEnd,
                                                         @NotNull Document document,
                                                         @NotNull String prefix,
                                                         @NotNull String suffix)