void (PsiElement elementForUpdating, UpdateParameterInfoContextBase context, Runnable continuation) { PsiElement parameterOwner = context.getParameterOwner(); if (parameterOwner != null && !parameterOwner.equals(elementForUpdating)) { context.removeHint(); return; } runTask(myProject, ReadAction.nonBlocking(() -> { DumbModeAccessType.RELIABLE_DATA_ONLY.ignoreDumbMode(() -> myParameterInfoControllerData.getHandler().updateParameterInfo(elementForUpdating, context)); return elementForUpdating; }) .withDocumentsCommitted(myProject) .expireWhen( () -> !myKeepOnHintHidden && !myHint.isVisible() && !ApplicationManager.getApplication().isHeadlessEnvironment() || getCurrentOffset() != context.getOffset() || !elementForUpdating.isValid()) .expireWith(this), element -> { if (element != null && continuation != null) { context.applyUIChanges(); continuation.run(); } }, null, myEditor); }