void (@NotNull AnActionEvent e) { final Presentation presentation = e.getPresentation(); presentation.setEnabled(false); presentation.setVisible(e.isFromActionToolbar()); final Project project = e.getProject(); if (project != null) { Collection<CoverageSuitesBundle> activeSuites = CoverageDataManager.getInstance(project).activeSuites(); boolean enabled = myCoverageSuite == null ? !activeSuites.isEmpty() : activeSuites.contains(myCoverageSuite); presentation.setEnabledAndVisible(enabled); } }