void (@Nullable HyperlinkListener listener, @NotNull MessageType messageType, @NotNull List<String> lines) { UsageViewContentManager.getInstance(myProject); // in case tool window not registered Collection<VirtualFile> largeFiles = myProcessPresentation.getLargeFiles(); List<String> resultLines = new ArrayList<>(lines); HyperlinkListener resultListener = listener; if (!largeFiles.isEmpty()) { String shortMessage = "(<a href='" + LARGE_FILES_HREF_TARGET + "'>" + UsageViewBundle.message("large.files.were.ignored", largeFiles.size()) + "</a>)"; resultLines.add(shortMessage); resultListener = addHrefHandling(resultListener, LARGE_FILES_HREF_TARGET, () -> { String detailedMessage = detailedLargeFilesMessage(largeFiles); List<String> strings = new ArrayList<>(lines); strings.add(detailedMessage); //noinspection SSBasedInspection ToolWindowManager.getInstance(myProject).notifyByBalloon(ToolWindowId.FIND, messageType, wrapInHtml(strings), AllIcons.Actions.Find, listener); }); } Runnable searchIncludingProjectFileUsages = myProcessPresentation.searchIncludingProjectFileUsages(); if (searchIncludingProjectFileUsages != null) { resultLines.add(UsageViewBundle.message("message.occurrences.in.project.configuration.files.are.skipped") + " <a href='" + SHOW_PROJECT_FILE_OCCURRENCES_HREF_TARGET + "'>" + UsageViewBundle.message("message.include.them") + "</a>"); resultListener = addHrefHandling(resultListener, SHOW_PROJECT_FILE_OCCURRENCES_HREF_TARGET, searchIncludingProjectFileUsages); } Collection<UnloadedModuleDescription> unloaded; try (AccessToken ignore = SlowOperations.knownIssue("IDEA-333936, EA-828575")) { unloaded = getUnloadedModulesBelongingToScope(); } MessageType actualType = messageType; if (!unloaded.isEmpty()) { if (actualType == MessageType.INFO) { actualType = MessageType.WARNING; } resultLines.add(mayHaveUsagesInUnloadedModulesMessage(unloaded)); } //noinspection SSBasedInspection ToolWindowManager.getInstance(myProject).notifyByBalloon(ToolWindowId.FIND, actualType, wrapInHtml(resultLines), AllIcons.Actions.Find, resultListener); }