ExistingLibraryEditor (@NotNull Library library) { final LibraryTable table = library.getTable(); if (table == null) return null; final LibraryTable.ModifiableModel model = myContext.getModifiableLibraryTable(table); if (model instanceof LibrariesModifiableModel) { return ((LibrariesModifiableModel)model).getLibraryEditor(library); } return null; }