void (LibraryModel model) { myFirstLoad = false; ApplicationManager.getApplication().assertWriteAccessAllowed(); if (!model.isChanged()) { return; } incrementModificationCount(); Set<Library> removedLibraries = model.myRemovedLibraries; for (Library library : removedLibraries) { fireBeforeLibraryRemoved(library); } myModel.applyChanges(model); for (Library library : removedLibraries) { Disposer.dispose(library); fireAfterLibraryRemoved(library); } for (Library library : model.myAddedLibraries) { fireLibraryAdded(library); } }