private @NlsSafe String getLibraryName(@NotNull Library library) {
    final PsiJavaModule javaModule = JavaModuleGraphUtil.findDescriptorByLibrary(library, myCurrentModule.getProject());
    if (javaModule != null && PsiNameHelper.isValidModuleName(javaModule.getName(), javaModule)) {
      return javaModule.getName();
    } else {
      return library.getPresentableName();
    }
  }
private @NlsSafe String getLibraryName(@NotNull Library library)