private void moveSearchPopup() {
    if (myComponent == null || mySearchPopup == null || myPopupLayeredPane == null) return;
    Point lPaneP = myPopupLayeredPane.getLocationOnScreen();
    Point componentP = getComponentLocationOnScreen();
    Rectangle r = getComponentVisibleRect();
    Dimension prefSize = mySearchPopup.getPreferredSize();
    Window window = (Window)SwingUtilities.getAncestorOfClass(Window.class, myComponent);
    Point windowP;
    if (window instanceof JDialog) {
      windowP = ((JDialog)window).getContentPane().getLocationOnScreen();
    }
    else if (window instanceof JFrame) {
      windowP = ((JFrame)window).getContentPane().getLocationOnScreen();
    }
    else {
      windowP = window.getLocationOnScreen();
    }
    int y = r.y + componentP.y - lPaneP.y - prefSize.height;
    y = Math.max(y, windowP.y - lPaneP.y);
    Point location = new Point(componentP.x - lPaneP.x + r.x, y);

    if (Registry.is("ide.speed.search.allow.custom.location")) {
      SpeedSearchLocator locator = DataManager.getInstance().getDataContext(myComponent).getData(PlatformDataKeys.SPEED_SEARCH_LOCATOR);
      if (locator != null) {
        RelativeRectangle relativeRectangle = locator.getSizeAndLocation(myComponent);
        if (relativeRectangle != null) {
          Rectangle rect = relativeRectangle.getRectangleOn(myPopupLayeredPane);
          location = rect.getLocation();
          prefSize = rect.getSize();
          mySearchPopup.setPreferredSize(prefSize);
        }
      }
    }

    mySearchPopup.setLocation(location);
    mySearchPopup.setSize(prefSize);
    mySearchPopup.setVisible(true);
    mySearchPopup.validate();
  }
private void moveSearchPopup()