void (@NotNull AnActionEvent e) { PackageDependenciesNode node = (PackageDependenciesNode)e.getData(PlatformCoreDataKeys.SELECTED_ITEM); e.getPresentation().setEnabled(node != null && node.canSelectInLeftTree(myDependencies)); }