@Override
      public void actionPerformed(ActionEvent e) {
        final Ref<JBPopup> popupRef = new Ref<>();
        final Tree tree = buildRegisteredProjectsTree(project, externalSystemId);
        tree.setBorder(JBUI.Borders.empty(8));
        Runnable treeSelectionCallback = () -> {
          TreePath path = tree.getSelectionPath();
          if (path != null) {
            Object lastPathComponent = path.getLastPathComponent();
            if (lastPathComponent instanceof ExternalSystemNode) {
              Object e1 = ((ExternalSystemNode)lastPathComponent).getDescriptor().getElement();
              if (e1 instanceof ExternalProjectPojo pojo) {
                textField.setText(pojo.getPath());
                Editor editor = textField.getEditor();
                if (editor != null) {
                  collapseIfPossible(editor, externalSystemId, project);
                }
              }
            }
          }
          popupRef.get().closeOk(null);
        };
        JBPopup popup = new PopupChooserBuilder(tree)
          .setTitle(ExternalSystemBundle.message("run.configuration.title.choose.registered.project", externalSystemId.getReadableName()))
          .setResizable(true)
          .setItemChosenCallback(treeSelectionCallback)
          .setAutoselectOnMouseMove(true)
          .setCloseOnEnter(false)
          .createPopup();
        popupRef.set(popup);
        popup.showUnderneathOf(selectRegisteredProjectButton);
      }
@Override
      public void actionPerformed(ActionEvent e)