void () { if (canBeDisposed()) { Disposer.dispose(this); return; } PsiFile file = PsiUtilBase.getPsiFileInEditor(myEditor, myProject); int caretOffset = myEditor.getCaretModel().getOffset(); int offset = getCurrentOffset(); UpdateParameterInfoContextBase context = new UpdateParameterInfoContextBase(offset, file); executeFindElementForUpdatingParameterInfo(context, elementForUpdating -> { myParameterInfoControllerData.getHandler().processFoundElementForUpdatingParameterInfo(elementForUpdating, context); if (elementForUpdating != null) { executeUpdateParameterInfo(elementForUpdating, context, () -> { boolean knownParameter = (myParameterInfoControllerData.getDescriptors().length == 1 || myParameterInfoControllerData.getHighlighted() != null) && myParameterInfoControllerData.getCurrentParameterIndex() != -1; if (mySingleParameterInfo && !knownParameter && myHint.isVisible()) { hideHint(); } if (myKeepOnHintHidden && knownParameter && !myHint.isVisible()) { AutoPopupController.getInstance(myProject).autoPopupParameterInfo(myEditor, null); } if (!myDisposed && (myHint.isVisible() && !myEditor.isDisposed() && (myEditor.getComponent().getRootPane() != null || ApplicationManager.getApplication().isUnitTestMode()) || ApplicationManager.getApplication().isHeadlessEnvironment())) { Model result = myComponent.update(mySingleParameterInfo); result.project = myProject; result.range = myParameterInfoControllerData.getParameterOwner().getTextRange(); result.editor = myEditor; for (ParameterInfoListener listener : ParameterInfoListener.EP_NAME.getExtensionList()) { listener.hintUpdated(result); } if (ApplicationManager.getApplication().isHeadlessEnvironment()) return; IdeTooltip tooltip = myHint.getCurrentIdeTooltip(); short position = tooltip != null ? toShort(tooltip.getPreferredPosition()) : HintManager.ABOVE; Pair<Point, Short> pos = myProvider.getBestPointPosition( myHint, elementForUpdating, caretOffset, myEditor.getCaretModel().getVisualPosition(), position); //noinspection MagicConstant HintManagerImpl.adjustEditorHintPosition(myHint, myEditor, pos.getFirst(), pos.getSecond()); } }); } else { hideHint(); if (!myKeepOnHintHidden) { Disposer.dispose(this); } } }); }