void (@NotNull AnActionEvent e) { super.update(e); ToolWindow toolWindow = e.getData(PlatformDataKeys.TOOL_WINDOW); Content content = toolWindow != null ? toolWindow.getContentManager().getSelectedContent() : null; e.getPresentation().setEnabledAndVisible(content != null && content.getComponent() instanceof ServiceView); }