Library (@NotNull LibraryData libraryData) { final LibraryTable libraryTable = LibraryTablesRegistrar.getInstance().getLibraryTable(myProject); for (Library ideLibrary : libraryTable.getLibraries()) { if (isRelated(ideLibrary, libraryData)) return ideLibrary; } return null; }