void (@NotNull HighlightInfo info, @NotNull Editor editor, @NotNull PsiFile file, @NotNull List<? super HighlightInfo.IntentionActionDescriptor> outList, int group, int offset, boolean checkOffset) { if (group != -1 && group != info.getGroup()) return; boolean fixRangeIsEmpty = info.getFixTextRange().isEmpty(); Editor[] injectedEditor = {null}; PsiFile[] injectedFile = {null}; ProgressIndicator indicator = ProgressIndicatorProvider.getGlobalProgressIndicator(); boolean[] hasAvailableAction = {false}; HighlightInfo.IntentionActionDescriptor[] unavailableAction = {null}; info.findRegisteredQuickFix((descriptor, range) -> { if (!fixRangeIsEmpty && isEmpty(range)) { return null; } if (DumbService.isDumb(file.getProject()) && !DumbService.isDumbAware(descriptor.getAction())) { return null; } Project project = file.getProject(); if (checkOffset && !range.contains(offset) && offset != range.getEndOffset()) { return null; } Editor editorToUse; PsiFile fileToUse; int offsetToUse; if (info.isFromInjection()) { if (injectedEditor[0] == null) { injectedFile[0] = InjectedLanguageUtilBase.findInjectedPsiNoCommit(file, offset); injectedEditor[0] = InjectedLanguageUtil.getInjectedEditorForInjectedFile(editor, injectedFile[0]); } editorToUse = injectedFile[0] == null ? editor : injectedEditor[0]; fileToUse = injectedFile[0] == null ? file : injectedFile[0]; offsetToUse = !(editorToUse instanceof EditorWindow editorWindow) ? offset : editorWindow.logicalPositionToOffset(editorWindow.hostToInjected(editor.offsetToLogicalPosition(offset))); } else { editorToUse = editor; fileToUse = file; offsetToUse = offset; } if (indicator != null) { indicator.setText(descriptor.getDisplayName()); } if (ShowIntentionActionsHandler.availableFor(fileToUse, editorToUse, offsetToUse, descriptor.getAction())) { outList.add(descriptor); hasAvailableAction[0] = true; } else if (unavailableAction[0] == null) { unavailableAction[0] = descriptor; } return null; }); if (!hasAvailableAction[0] && unavailableAction[0] != null) { HighlightInfo.IntentionActionDescriptor emptyActionDescriptor = unavailableAction[0].copyWithEmptyAction(); if (emptyActionDescriptor != null) { outList.add(emptyActionDescriptor); } } }