EditExistingLibraryDialog (Component parent, LibraryTableModifiableModelProvider modelProvider, Library library, @Nullable Project project, LibraryTablePresentation presentation, StructureConfigurableContext context) { LibraryTable.ModifiableModel modifiableModel = modelProvider.getModifiableModel(); boolean commitChanges = false; ExistingLibraryEditor libraryEditor; if (modifiableModel instanceof LibrariesModifiableModel) { libraryEditor = ((LibrariesModifiableModel)modifiableModel).getLibraryEditor(library); } else { libraryEditor = new ExistingLibraryEditor(library, context); commitChanges = true; } return new EditExistingLibraryDialog(parent, modifiableModel, project, libraryEditor, commitChanges, presentation, context); }