@Override
  public void actionPerformed(@NotNull AnActionEvent event) {
    final OrderEntry entry = myPanel.getSelectedEntry();
    if (!(entry instanceof LibraryOrderEntry libraryEntry)) return;
    final LibraryEx library = (LibraryEx)libraryEntry.getLibrary();
    if (library == null) return;

    final Library copied = doCopy(library);
    if (copied == null) return;

    if (!isConvertingToModuleLibrary()) {
      OrderEntryUtil.replaceLibrary(myPanel.getRootModel(), library, copied);
    }
    else {
      OrderEntryUtil.replaceLibraryEntryByAdded(myPanel.getRootModel(), libraryEntry);
    }
  }
@Override
  public void actionPerformed(@NotNull AnActionEvent event)