void (@NotNull AnActionEvent e) { QuickActionProvider quickActionProvider = e.getData(QuickActionProvider.KEY); if (quickActionProvider == null) { e.getPresentation().setEnabled(false); return; } List<AnAction> actions = quickActionProvider.getActions(true); e.getPresentation().setEnabled(!actions.isEmpty()); }