boolean () { myAdComponent.showRandomText(); if (Boolean.TRUE.equals(myEditor.getUserData(AutoPopupController.NO_ADS))) { myAdComponent.clearAdvertisements(); } Boolean showBottomPanel = myEditor.getUserData(AutoPopupController.SHOW_BOTTOM_PANEL_IN_LOOKUP_UI); myUi = new LookupUi(this, myAdComponent, myList, showBottomPanel == null || showBottomPanel); myUi.setCalculating(myCalculating); Point p = myUi.calculatePosition().getLocation(); if (ScreenReader.isActive()) { myList.setFocusable(true); setFocusRequestor(myList); AnActionEvent actionEvent = AnActionEvent.createFromDataContext(ActionPlaces.EDITOR_POPUP, null, ((EditorImpl)myEditor).getDataContext()); delegateActionToEditor(IdeActions.ACTION_EDITOR_BACKSPACE, null, actionEvent); delegateActionToEditor(IdeActions.ACTION_EDITOR_ESCAPE, null, actionEvent); delegateActionToEditor(IdeActions.ACTION_EDITOR_TAB, () -> new ChooseItemAction.Replacing(), actionEvent); delegateActionToEditor(IdeActions.ACTION_EDITOR_ENTER, /* e.g. rename popup comes initially unfocused */ () -> getLookupFocusDegree() == LookupFocusDegree.UNFOCUSED ? new NextVariableAction() : new ChooseItemAction.FocusedOnly(), actionEvent); delegateActionToEditor(IdeActions.ACTION_EDITOR_MOVE_CARET_UP, null, actionEvent); delegateActionToEditor(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN, null, actionEvent); delegateActionToEditor(IdeActions.ACTION_EDITOR_MOVE_CARET_RIGHT, null, actionEvent); delegateActionToEditor(IdeActions.ACTION_EDITOR_MOVE_CARET_LEFT, null, actionEvent); delegateActionToEditor(IdeActions.ACTION_RENAME, null, actionEvent); } try { HintManagerImpl.getInstanceImpl().showEditorHint(this, myEditor, p, HintManager.HIDE_BY_ESCAPE | HintManager.UPDATE_BY_SCROLLING, 0, false, HintManagerImpl.createHintHint(myEditor, p, this, HintManager.UNDER). setRequestFocus(ScreenReader.isActive()). setAwtTooltip(false)); } catch (Exception e) { LOG.error(e); } if (!isVisible() || !myList.isShowing()) { hideLookup(false); return false; } return true; }