public static List<SimpleClasspathElement> createElements(@Nullable Project project, @NotNull Element element) {
    final String name = element.getAttributeValue(GlobalLibraryReferenceElement.NAME_ATTRIBUTE);
    final String level = element.getAttributeValue(GlobalLibraryReferenceElement.LEVEL_ATTRIBUTE);
    final String url = element.getChildText(SingleRootClasspathElement.URL_ELEMENT);
    if (!StringUtil.isEmpty(url)) {
      return Collections.singletonList(new SingleRootClasspathElement(url));
    }
    if (name == null || level == null) {
      return Collections.emptyList();
    }
    if (LibraryTablesRegistrar.APPLICATION_LEVEL.equals(level)) {
      return Collections.singletonList(new GlobalLibraryReferenceElement(name));
    }
    //this is needed only for backward compatibility with version before 8
    if (project != null) {
      final LibraryTable libraryTable = LibraryTablesRegistrar.getInstance().getLibraryTableByLevel(level, project);
      if (libraryTable != null) {
        final Library library = libraryTable.getLibraryByName(name);
        if (library != null) {
          return createElements(library);
        }
      }
    }
    return Collections.emptyList();
  }
public static List<SimpleClasspathElement> createElements(@Nullable Project project, @NotNull Element element)