boolean (@NotNull AnActionEvent e) { final Project project = getProject(e); if (project == null) return false; ProjectSystemId systemId = getSystemId(e); if(!GradleConstants.SYSTEM_ID.equals(systemId)) return false; if (GradleSettings.getInstance(project).getLinkedProjectsSettings().size() > 1) { final ProjectNode projectNode = e.getData(ExternalSystemDataKeys.SELECTED_PROJECT_NODE); if (projectNode == null || projectNode.getData() == null) return false; GradleProjectSettings projectSettings = GradleSettings.getInstance(project).getLinkedProjectSettings(projectNode.getData().getLinkedExternalProjectPath()); GradleProjectSettings.CompositeBuild compositeBuild = null; if (projectSettings != null) { compositeBuild = projectSettings.getCompositeBuild(); } if (compositeBuild == null || compositeBuild.getCompositeDefinitionSource() == CompositeDefinitionSource.IDE) return true; } return false; }