private void manageSearchPopup(@Nullable SearchPopup searchPopup) {
    if (mySearchPopup != null) {
      Project project = CommonDataKeys.PROJECT.getData(
        DataManager.getInstance().getDataContext(myComponent.getRootPane()));
      UIEventLogger.IncrementalSearchCancelled.log(project, myComponent.getClass());
      if (myPopupLayeredPane != null) {
        myPopupLayeredPane.remove(mySearchPopup);
        myPopupLayeredPane.validate();
        myPopupLayeredPane.repaint();
        myPopupLayeredPane = null;
      }

      if (myListenerDisposable != null) {
        Disposer.dispose(myListenerDisposable);
        myListenerDisposable = null;
      }
      if (isStickySearch()) {
        myComponent.putClientProperty(SEARCH_TEXT_KEY, Strings.nullize(getEnteredPrefix()));
      }
    }
    else if (searchPopup != null) {
      Project project = CommonDataKeys.PROJECT.getData(
        DataManager.getInstance().getDataContext(myComponent.getRootPane()));
      FeatureUsageTracker.getInstance().triggerFeatureUsed("ui.tree.speedsearch");
      UIEventLogger.IncrementalSearchActivated.log(project, myComponent.getClass());
    }

    mySearchPopup = myComponent.isShowing() ? searchPopup : null;

    fireStateChanged();

    //select here!

    if (mySearchPopup == null || !myComponent.isDisplayable()) return;

    JRootPane rootPane = myComponent.getRootPane();
    Project project = rootPane != null && rootPane.getParent() instanceof IdeFrame o ? o.getProject() : null;
    if (project != null && !project.isDefault() && !project.isDisposed()) {
      myListenerDisposable = Disposer.newDisposable();
      project.getMessageBus().connect(myListenerDisposable).subscribe(ToolWindowManagerListener.TOPIC, myToolWindowListener);
    }
    myPopupLayeredPane = rootPane == null ? null : rootPane.getLayeredPane();
    if (myPopupLayeredPane == null) {
      LOG.error(this + " in " + myComponent);
      return;
    }
    myPopupLayeredPane.add(mySearchPopup, JLayeredPane.POPUP_LAYER);
    moveSearchPopup();
  }
private void manageSearchPopup(@Nullable SearchPopup searchPopup)