void (@NotNull final AnActionEvent e) { final Project project = e.getProject(); final Editor editor = e.getData(CommonDataKeys.EDITOR); if (Boolean.TRUE.equals(e.getData(PlatformCoreDataKeys.IS_MODAL_CONTEXT))) { return; } if (project != null && editor != null) { if (DumbService.getInstance(project).isDumb()) { DumbService.getInstance(project).showDumbModeNotificationForAction(IdeBundle.message("goto.custom.region.message.dumb.mode"), ActionManager.getInstance().getId(this)); return; } CommandProcessor processor = CommandProcessor.getInstance(); processor.executeCommand( project, () -> { Collection<FoldingDescriptor> foldingDescriptors = getCustomFoldingDescriptors(editor, project); if (foldingDescriptors.size() > 0) { CustomFoldingRegionsPopup.show(foldingDescriptors, editor, project); } else { HintManager.getInstance().showInformationHint(editor, IdeBundle.message("goto.custom.region.message.unavailable")); } }, IdeBundle.message("goto.custom.region.command"), null); } }