boolean (@NotNull AnActionEvent e) { if (!super.isEnabled(e)) return false; final List<ExternalSystemNode> selectedNodes = e.getData(ExternalSystemDataKeys.SELECTED_NODES); if (selectedNodes == null || selectedNodes.size() != 1) return false; final Object externalData = selectedNodes.get(0).getData(); return (externalData instanceof ProjectData || externalData instanceof ModuleData); }