void (@NotNull Library library) { if (getLibrariesModifiableModel().getLibraryByName(library.getName()) == null) return; removeLibraryEditor(library); final Library existingLibrary = myTable.getLibraryByName(library.getName()); getLibrariesModifiableModel().removeLibrary(library); final BaseLibrariesConfigurable configurable = ProjectStructureConfigurable.getInstance(myProject).getConfigurableFor(library); configurable.removeLibraryNode(library); if (existingLibrary == library) { myRemovedLibraries.add(library); } }