void (@NotNull DataNode<ModuleData> ideModule, File ideaOutDir) { ContentRootData excludedContentRootData; DataNode<ContentRootData> contentRootDataDataNode = ExternalSystemApiUtil.find(ideModule, ProjectKeys.CONTENT_ROOT); if (contentRootDataDataNode == null || !isContentRootAncestor(contentRootDataDataNode.getData(), ideaOutDir)) { excludedContentRootData = new ContentRootData(GradleConstants.SYSTEM_ID, ideaOutDir.getPath()); ideModule.createChild(ProjectKeys.CONTENT_ROOT, excludedContentRootData); } else { excludedContentRootData = contentRootDataDataNode.getData(); } excludedContentRootData.storePath(ExternalSystemSourceType.EXCLUDED, ideaOutDir.getPath()); }