public static List<SimpleClasspathElement> createElements(@NotNull Library library) {
    final LibraryTable table = library.getTable();
    if (table != null && LibraryTablesRegistrar.APPLICATION_LEVEL.equals(table.getTableLevel())) {
      return Collections.singletonList(new GlobalLibraryReferenceElement(library.getName()));
    }
    final List<SimpleClasspathElement> elements = new ArrayList<>();
    for (VirtualFile file : library.getFiles(OrderRootType.CLASSES)) {
      elements.add(new SingleRootClasspathElement(file.getUrl()));
    }
    return elements;
  }
public static List<SimpleClasspathElement> createElements(@NotNull Library library)