boolean (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null || project.isDisposed()) { return false; } ToolWindow window = getToolWindow(e); return (window != null) && isSelected(window); }