void (@NotNull AnActionEvent e) { final Project project = e.getProject(); if (project == null) { e.getPresentation().setEnabled(false); return; } final TreePath[] paths = DynamicToolWindowWrapper.getInstance(project).getTreeTable().getTree().getSelectionPaths(); e.getPresentation().setEnabled(paths != null); }