void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); removeAll(); Project project = event.getData(CommonDataKeys.PROJECT); if (project == null) { presentation.setEnabledAndVisible(false); return; } updateGroups(false); presentation.setEnabled(true); presentation.setVisible(getChildrenCount() > 0); }