private static VirtualFile getClasspathEntry(PsiJavaModule javaModule, ProjectFileIndex fileIndex, JarFileSystem jarFileSystem) {
    var moduleFile = PsiImplUtil.getModuleVirtualFile(javaModule);
    var moduleDependency = fileIndex.getModuleForFile(moduleFile);
    if (moduleDependency != null) {
      var moduleExtension = CompilerModuleExtension.getInstance(moduleDependency);
      if (moduleExtension != null) {
        var inTests = fileIndex.isInTestSourceContent(moduleFile);
        return inTests ? moduleExtension.getCompilerOutputPathForTests() : moduleExtension.getCompilerOutputPath();
      }
    }

    return jarFileSystem.getLocalByEntry(moduleFile);
  }
private static VirtualFile getClasspathEntry(PsiJavaModule javaModule, ProjectFileIndex fileIndex, JarFileSystem jarFileSystem)