Library (@NotNull LibraryData libraryData) { final LibraryTable.ModifiableModel libraryTable = getModifiableProjectLibrariesModel(); for (Library ideLibrary: libraryTable.getLibraries()) { if (ExternalSystemApiUtil.isRelated(ideLibrary, libraryData)) return ideLibrary; } return null; }