void (final ListPopup groupPopup, final AnActionEvent e) { final Component component = e.getInputEvent().getComponent(); if (component instanceof ActionButtonComponent) { groupPopup.showUnderneathOf(component); } else { groupPopup.showInBestPositionFor(e.getDataContext()); } }