public static void unexcludeOutDir(@NotNull DataNode<ModuleData> ideModule, File ideaOutDir) {
    DataNode<ContentRootData> contentRootDataDataNode = ExternalSystemApiUtil.find(ideModule, ProjectKeys.CONTENT_ROOT);

    if (contentRootDataDataNode != null && isContentRootAncestor(contentRootDataDataNode.getData(), ideaOutDir)) {
          ContentRootData excludedContentRootData;
          excludedContentRootData = contentRootDataDataNode.getData();
          excludedContentRootData.getPaths(ExternalSystemSourceType.EXCLUDED).removeIf(sourceRoot -> {
            return sourceRoot.getPath().equals(ideaOutDir.getPath()); });
        }
  }
public static void unexcludeOutDir(@NotNull DataNode<ModuleData> ideModule, File ideaOutDir)