void () { if (myUpdateScheduled.compareAndSet(false, true)) { SwingUtilities.invokeLater(() -> { myRepaintScheduled.set(false); myUpdateScheduled.set(false); if (this == myPane) { CustomFoldRegion foldRegion = myItem.getFoldRegion(); if (foldRegion != null) { DocRenderItemUpdater.getInstance().updateFoldRegions(Collections.singleton(foldRegion), false); } } }); } }