void (@NotNull AnActionEvent e) { super.update(e); ServiceViewOptions viewOptions = e.getData(ServiceViewActionUtils.OPTIONS_KEY); Presentation presentation = e.getPresentation(); if (viewOptions != null && !viewOptions.isGroupByServiceGroups()) { presentation.setEnabledAndVisible(false); return; } Set<ServiceViewContributor> contributors = e.getData(ServiceViewActionUtils.CONTRIBUTORS_KEY); if (contributors != null) { for (ServiceViewContributor contributor : contributors) { if (contributor instanceof RunDashboardServiceViewContributor) { presentation.setEnabledAndVisible(true); return; } } } presentation.setEnabledAndVisible(false); }