boolean (Module module) { if (isExternalSystemAwareModule(GradleConstants.SYSTEM_ID, module)) { String projectPath = getExternalProjectPath(module); for (VirtualFile root : ModuleRootManager.getInstance(module).getContentRoots()) { if (projectPath != null && !FileUtil.isAncestor(projectPath, root.getPath(), true)) { return true; } } return false; } return true; }