@RequiresReadLock
  private static @NotNull List<? extends LibraryOrderEntry> findLibraryEntriesForFile(@NotNull VirtualFile file,
                                                                                      @NotNull Project project) {
    List<LibraryOrderEntry> entries = new ArrayList<>();

    for (OrderEntry entry : ProjectFileIndex.getInstance(project).getOrderEntriesForFile(file)) {
      if (entry instanceof LibraryOrderEntry) {
        entries.add((LibraryOrderEntry)entry);
      }
    }

    return entries;
  }
@RequiresReadLock
  private static @NotNull List<? extends LibraryOrderEntry> findLibraryEntriesForFile(@NotNull VirtualFile file,
                                                                                      @NotNull Project project)