@NotNull
  public static List<TextRange> expandToWholeLine(@NotNull CharSequence text, @Nullable TextRange range, boolean isSymmetric) {
    List<TextRange> result = new ArrayList<>();

    if (range == null) {
      return result;
    }

    LOG.assertTrue(range.getEndOffset() <= text.length());
    if (!StringUtil.contains(text, range.getStartOffset(), range.getEndOffset(), '\n')) {
      result.add(range);
    }

    TextRange expanded = getExpandedRange(text, range, isSymmetric);
    if (expanded != null) {
      result.add(expanded);
    } else {
      result.add(range);
    }
    return result;
  }
@NotNull
  public static List<TextRange> expandToWholeLine(@NotNull CharSequence text, @Nullable TextRange range, boolean isSymmetric)