void classifyFiles(@NotNull Project project, @NotNull Collection<VirtualFile> files) {
      WorkspaceFileIndex workspaceFileIndex = WorkspaceFileIndex.getInstance(project);
      VirtualFileUrlManager fileUrlManager = WorkspaceModel.getInstance(project).getVirtualFileUrlManager();
      for (VirtualFile file : files) {
        WorkspaceFileSet fileSet = ReadAction.nonBlocking(() -> {
          return workspaceFileIndex.findFileSet(file, true, true, true, true, true);
        }).expireWith(project).executeSynchronously();

        if (fileSet == null) {
          filesFromIndexableSetContributors.add(file);
          continue;
        }

        EntityPointer<?> entityPointer = WorkspaceFileSetRecognizer.INSTANCE.getEntityPointer(fileSet);

        if (fileSet.getKind() == WorkspaceFileKind.CONTENT || fileSet.getKind() == WorkspaceFileKind.TEST_CONTENT) {
          LOG.assertTrue(entityPointer != null, "Content element's fileSet without entity reference, " + fileSet);
          Module module = WorkspaceFileSetRecognizer.INSTANCE.getModuleForContent(fileSet);
          VirtualFileUrl url = VirtualFileUrls.toVirtualFileUrl(file, fileUrlManager);
          if (module != null) {
            addModuleRoot(module, entityPointer, url);
          }
          else {
            addContentRoot(entityPointer, url);
          }
          continue;
        }

        //here we have WorkspaceFileKind.EXTERNAL or WorkspaceFileKind.EXTERNAL_SOURCE
        Sdk sdk = WorkspaceFileSetRecognizer.INSTANCE.getSdk(fileSet);
        if (sdk != null) {
          addSdkFile(sdk, file);
          continue;
        }

        if (WorkspaceFileSetRecognizer.INSTANCE.isFromAdditionalLibraryRootsProvider(fileSet)) {
          filesFromAdditionalLibraryRootsProviders.add(file);
          continue;
        }

        LibraryId libraryId = WorkspaceFileSetRecognizer.INSTANCE.getLibraryId(fileSet, entityStorage);
        if (libraryId != null) {
          addLibraryFile(libraryId, file, fileSet.getKind() == WorkspaceFileKind.EXTERNAL_SOURCE);
          continue;
        }

        LOG.assertTrue(entityPointer != null, "External element's fileSet without entity reference, " + fileSet);
        VirtualFileUrl url = VirtualFileUrls.toVirtualFileUrl(file, fileUrlManager);
        if (fileSet.getKind() == WorkspaceFileKind.EXTERNAL_SOURCE) {
          addExternalRoots(entityPointer, Collections.emptyList(), Collections.singletonList(url));
        }
        else if (fileSet.getKind() == WorkspaceFileKind.EXTERNAL) {
          addExternalRoots(entityPointer, Collections.singletonList(url), Collections.emptyList());
        }
        else {
          addCustomKindRoot(entityPointer, url);
        }
      }
    }
void classifyFiles(@NotNull Project project, @NotNull Collection<VirtualFile> files)