public @Nullable VirtualFile getModuleSourceOrLibraryClassesRoot(@NotNull VirtualFile file) {
    WorkspaceFileInternalInfo info = myWorkspaceFileIndex.getFileInfo(file, true, true, true, false, false);
    WorkspaceFileSetWithCustomData<?> fileSet = info.findFileSet(it -> {
      WorkspaceFileKind kind = it.getKind();
      return kind.isContent() && it.getData() instanceof ModuleOrLibrarySourceRootData || kind == WorkspaceFileKind.EXTERNAL;
    });
    return fileSet != null ? fileSet.getRoot() : null;
  }
public @Nullable VirtualFile getModuleSourceOrLibraryClassesRoot(@NotNull VirtualFile file)