public static @Nullable OrderEntry findLibraryEntry(@NotNull VirtualFile file, @NotNull Project project) {
    List<OrderEntry> entries = ProjectRootManager.getInstance(project).getFileIndex().getOrderEntriesForFile(file);
    for (OrderEntry entry : entries) {
      if (entry instanceof LibraryOrderEntry || entry instanceof JdkOrderEntry) {
        return entry;
      }
    }
    return null;
  }
public static @Nullable OrderEntry findLibraryEntry(@NotNull VirtualFile file, @NotNull Project project)