void (@NotNull AnActionEvent e) { ToolWindow toolWindow = getToolWindow(e); e.getPresentation().setVisible(toolWindow != null); e.getPresentation().setEnabled(toolWindow != null && !myAnchor.isApplied(toolWindow)); }