void (@NotNull List<? extends MatchResult> matchResults, @NotNull Editor editor, @NotNull PsiFile file, @NlsContexts.StatusBarText @Nullable String statusBarText) { ApplicationManager.getApplication().invokeLater(() -> { if (myProject.isDisposed()) { return; } if (!matchResults.isEmpty()) { for (MatchResult result : matchResults) { final PsiElement match = result.getMatch(); if (match == null || match.getContainingFile() != file) continue; int start = -1; int end = -1; if (MatchResult.MULTI_LINE_MATCH.equals(result.getName())) { for (MatchResult child : result.getChildren()) { final TextRange range = child.getMatch().getTextRange(); final int startOffset = range.getStartOffset(); if (start == -1 || start > startOffset) { start = startOffset; } final int endOffset = range.getEndOffset(); if (end < endOffset) { end = endOffset; } } } else { final TextRange range = match.getTextRange(); start = range.getStartOffset(); end = range.getEndOffset(); } final HighlightManager highlightManager = HighlightManager.getInstance(myProject); highlightManager.addRangeHighlight(editor, start, end, EditorColors.SEARCH_RESULT_ATTRIBUTES, false, myRangeHighlighters); } HighlightHandlerBase.setupFindModel(myProject); } WindowManager.getInstance().getStatusBar(myProject).setInfo(statusBarText); }); }