public void scanLibraries() {
    myProgress.setIndeterminate(true);
    myProgress.pushState();
    try {
      try {
        for (File root : myEntryPointRoots) {
          myProgress.setText(JavaUiBundle.message("progress.text.scanning.for.libraries", root.getPath()));
          scanRootForLibraries(root);
        }
      }
      catch (ProcessCanceledException ignored) {
      }
      myProgress.setText(JavaUiBundle.message("progress.text.building.initial.libraries.layout"));
      final List<LibraryDescriptor> libraries = buildInitialLibrariesLayout(myJarToPackagesMap.keySet());
      // correct library names so that there are no duplicates
      final Set<String> libNames = new HashSet<>(myExistingProjectLibraryNames);
      for (LibraryDescriptor library : libraries) {
        final Collection<File> libJars = library.getJars();
        String baseName = libJars.size() == 1 ? FileUtilRt.getNameWithoutExtension(libJars.iterator().next().getName()) : library.getName();
        final String newName = UniqueNameGenerator.generateUniqueName(baseName, libNames);
        library.setName(newName);
        libNames.add(newName);
      }
      myLibraries = libraries;
    }
    finally {
      myProgress.popState();
    }
  }
public void scanLibraries()