void (@NotNull final Editor editor, @Nullable Caret caret, DataContext dataContext) { final List<FoldRegion> regions = getFoldRegionsForCaret(editor, caret, true); editor.getFoldingModel().runBatchFoldingOperation(() -> { for (FoldRegion region : regions) { region.setExpanded(false); } }); }