private static void runFoldingTasks(@NotNull Editor editor, @NotNull List<Runnable> tasks) {
    editor.getFoldingModel().runBatchFoldingOperation(() -> tasks.forEach(Runnable::run), true, false);
    tasks.clear();
  }
private static void runFoldingTasks(@NotNull Editor editor, @NotNull List<Runnable> tasks)