List<Library> (@NotNull ModuleRootModel model) { OrderEntry[] orderEntries = model.getOrderEntries(); List<Library> libraries = new ArrayList<>(); for (OrderEntry orderEntry : orderEntries) { if (orderEntry instanceof LibraryOrderEntry entry) { if (entry.isModuleLevel()) { libraries.add(entry.getLibrary()); } } } return libraries; }