Component () { LookupEx lookup = myManager == null ? null : LookupManager.getActiveLookup(myManager.getEditor()); if (lookup != null && lookup.getCurrentItem() != null && lookup.getComponent().isShowing()) { return lookup.getComponent(); } Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); JBPopup popup = PopupUtil.getPopupContainerFor(focusOwner); if (popup != null && popup != myHint && !popup.isDisposed()) { return popup.getContent(); } return null; }