void (@Nullable InputEvent event) { if (!isVisible()) return; LookupElement element = getCurrentItem(); if (element == null) { return; } Collection<LookupElementAction> actions = getActionsFor(element); if (actions.isEmpty()) { return; } UIEventLogger.LookupShowElementActions.log(myProject); Rectangle itemBounds = getCurrentItemBounds(); Rectangle visibleRect = SwingUtilities.convertRectangle(myList, myList.getVisibleRect(), getComponent()); ListPopup listPopup = JBPopupFactory.getInstance().createListPopup(new LookupActionsStep(actions, this, element)); Point p = (itemBounds.intersects(visibleRect) || event == null) ? new Point(itemBounds.x + itemBounds.width, itemBounds.y): SwingUtilities.convertPoint(event.getComponent(), new Point(0, event.getComponent().getHeight() + JBUIScale.scale(2)), getComponent()); listPopup.show(new RelativePoint(getComponent(), p)); }