@NotNull
  @Override
  public Set<UsageDescriptor> getProjectUsages(@NotNull final Project project)
      throws CollectUsagesException {
    final LibraryJarDescriptor[] descriptors =
        LibraryJarStatisticsService.getInstance().getTechnologyDescriptors();
    final Set<UsageDescriptor> result = new HashSet<>(descriptors.length);

    ApplicationManager.getApplication()
        .runReadAction(
            () -> {
              for (LibraryJarDescriptor descriptor : descriptors) {
                String className = descriptor.myClass;
                if (className == null) continue;

                PsiClass[] psiClasses =
                    JavaPsiFacade.getInstance(project)
                        .findClasses(className, ProjectScope.getLibrariesScope(project));
                for (PsiClass psiClass : psiClasses) {
                  if (psiClass == null) continue;

                  VirtualFile jarFile =
                      JarFileSystem.getInstance()
                          .getLocalVirtualFileFor(psiClass.getContainingFile().getVirtualFile());
                  if (jarFile == null) continue;

                  String version = getVersionByJarManifest(jarFile);
                  if (version == null) {
                    version = getVersionByJarFileName(jarFile.getName());
                  }

                  if (version == null || !StringUtil.containsChar(version, '.')) {
                    continue;
                  }

                  result.add(new UsageDescriptor(descriptor.myName + "_" + version, 1));
                }
              }
            });
    return result;
  }
 @NotNull
 public static String resolveShortWindowsName(@NotNull String path) throws IOException {
   return SystemInfo.isWindows && StringUtil.containsChar(path, '~')
       ? new File(path).getCanonicalPath()
       : path;
 }
 public static boolean shouldClip(String s) {
   return StringUtil.containsChar(s, '\n');
 }