void (@NotNull Library library) { incrementModificationCount(); assertWritable(); myLibraries.remove(library); if (myWritable) { //myRemovedLibraries are used only when the model is committed, so let's not populate it in the main model to save memory if (!myAddedLibraries.remove(library)) { myRemovedLibraries.add(library); } else { Disposer.dispose(library); } } myLibraryByNameCache = null; }