void (@NotNull IntentionActionWithTextCaching cachedAction) { myFinalRunnable = () -> { HintManager.getInstance().hideAllHints(); if (myProject.isDisposed()) return; if (myEditor != null && (myEditor.isDisposed() || (!UIUtil.isShowing(myEditor.getComponent()) && !ApplicationManager.getApplication().isUnitTestMode()))) { return; } if (DumbService.isDumb(myProject) && !DumbService.isDumbAware(cachedAction)) { DumbService.getInstance(myProject).showDumbModeNotificationForFunctionality( CodeInsightBundle.message("notification.0.is.not.available.during.indexing", cachedAction.getText()), DumbModeBlockedFunctionality.Intentions); return; } PsiDocumentManager.getInstance(myProject).commitAllDocuments(); PsiFile file = myEditor != null ? PsiUtilBase.getPsiFileInEditor(myEditor, myProject) : myFile; if (file == null) { return; } chooseActionAndInvoke(cachedAction, file, myProject, myEditor); }; }