private @Nullable DependencyOnPlugin editPluginDependency(@NotNull JComponent parent, final @NotNull DependencyOnPlugin original) {
    List<String> pluginIds = new ArrayList<>(getPluginNameByIdMap().keySet());
    if (!original.getPluginId().isEmpty() && !pluginIds.contains(original.getPluginId())) {
      pluginIds.add(original.getPluginId());
    }
    pluginIds.sort((o1, o2) -> getPluginNameById(o1).compareToIgnoreCase(getPluginNameById(o2)));

    ComboBox<String> pluginChooser = new ComboBox<>(ArrayUtilRt.toStringArray(pluginIds), 250);
    pluginChooser.setRenderer(SimpleListCellRenderer.create("", this::getPluginNameById));
    ComboboxSpeedSearch search = new ComboboxSpeedSearch(pluginChooser, null) {
      @Override
      protected String getElementText(Object element) {
        return getPluginNameById((String)element);
      }
    };
    search.setupListeners();
    pluginChooser.setSelectedItem(original.getPluginId());

    final JBTextField minVersionField = new JBTextField(StringUtil.notNullize(original.getRawMinVersion()));
    final JBTextField maxVersionField = new JBTextField(StringUtil.notNullize(original.getRawMaxVersion()));
    minVersionField.getEmptyText().setText(IdeBundle.message("label.version.any"));
    minVersionField.setColumns(17);
    maxVersionField.getEmptyText().setText(IdeBundle.message("label.version.any"));
    maxVersionField.setColumns(17);
    JPanel panel = FormBuilder.createFormBuilder()
      .addLabeledComponent(IdeBundle.message("label.plugin"), pluginChooser)
      .addLabeledComponent(IdeBundle.message("label.minimum.version"), minVersionField)
      .addLabeledComponent(IdeBundle.message("label.maximum.version"), maxVersionField)
      .getPanel();
    final DialogBuilder dialogBuilder = new DialogBuilder(parent).title(IdeBundle.message("dialog.title.required.plugin")).centerPanel(panel);
    dialogBuilder.setPreferredFocusComponent(pluginChooser);
    pluginChooser.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        dialogBuilder.setOkActionEnabled(!StringUtil.isEmpty((String)pluginChooser.getSelectedItem()));
      }
    });
    dialogBuilder.setHelpId("Required_Plugin");
    if (dialogBuilder.show() == DialogWrapper.OK_EXIT_CODE) {
      return new DependencyOnPlugin(((String)pluginChooser.getSelectedItem()),
                                    StringUtil.nullize(minVersionField.getText().trim()),
                                    StringUtil.nullize(maxVersionField.getText().trim()));
    }
    return null;
  }
private @Nullable DependencyOnPlugin editPluginDependency(@NotNull JComponent parent, final @NotNull DependencyOnPlugin original)