String (String className, GlobalSearchScope globalSearchScope, Project project) { VirtualFile root = ReadAction.nonBlocking(() -> { PsiClass psiClass = DumbService.getInstance(project).computeWithAlternativeResolveEnabled(() -> JavaPsiFacade.getInstance(project).findClass(className, globalSearchScope) ); VirtualFile virtualFile = PsiUtilCore.getVirtualFile(psiClass); if (virtualFile == null) return null; return ProjectFileIndex.getInstance(project).getClassRootForFile(virtualFile); }).executeSynchronously(); if (root != null && root.getFileSystem() instanceof JarFileSystem) { VirtualFile manifestFile = root.findFileByRelativePath(JarFile.MANIFEST_NAME); if (manifestFile != null) { try (final InputStream inputStream = manifestFile.getInputStream()) { Attributes mainAttributes = new Manifest(inputStream).getMainAttributes(); if ("junit.org".equals(mainAttributes.getValue(Attributes.Name.IMPLEMENTATION_VENDOR))) { return mainAttributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION); } } catch (IOException ignored) { } } } return null; }