void update(boolean updateSize, boolean updateContent, List<Runnable> foldingTasks) {
    CustomFoldRegion foldRegion = myItem.getFoldRegion();
    if (foldRegion != null) {
      if (updateSize) {
        myCachedWidth = -1;
        myCachedHeight = -1;
      }
      myContentUpdateNeeded = updateContent;
      Runnable task = () -> foldRegion.update();
      if (foldingTasks == null) {
        task.run();
      }
      else {
        foldingTasks.add(task);
      }
    }
  }
void update(boolean updateSize, boolean updateContent, List<Runnable> foldingTasks)