Library (@NotNull String level, @NotNull String libraryName) { if (level.equals(LibraryTablesRegistrar.PROJECT_LEVEL)) { return myModelsProvider.getLibraryByName(libraryName); } final LibraryTable table = LibraryTablesRegistrar.getInstance().getLibraryTableByLevel(level, myProject); return table != null ? table.getLibraryByName(libraryName) : null; }