use of com.intellij.openapi.roots.libraries.LibraryTable in project intellij by bazelbuild.
the class LibraryEditor method updateLibraryDependency.
private static void updateLibraryDependency(ModifiableRootModel model, LibraryKey libraryKey) {
LibraryTable libraryTable = ProjectLibraryTable.getInstance(model.getProject());
Library library = libraryTable.getLibraryByName(libraryKey.getIntelliJLibraryName());
if (library == null) {
logger.error("Library missing: " + libraryKey.getIntelliJLibraryName() + ". Please resync project to resolve.");
return;
}
model.addLibraryEntry(library);
}
Aggregations