public static @Nullable FoldRegion findFoldRegion(@NotNull Editor editor, int startOffset, int endOffset) {
    FoldRegion region = editor.getFoldingModel().getFoldRegion(startOffset, endOffset);
    return region != null && region.isValid() ? region : null;
  }
public static @Nullable FoldRegion findFoldRegion(@NotNull Editor editor, int startOffset, int endOffset)