void (@NotNull String line, @NotNull ConsoleViewContentType contentType) { Filter.Result result = ReadAction.compute(() -> { try { return myFilter.applyFilter(line, line.length()); } catch (Throwable t) { throw new RuntimeException("Error while applying " + myFilter + " to '"+line+"'", t); } }); if (result != null) { List<Filter.ResultItem> items = sort(result.getResultItems()); int lastOffset = 0; for (Filter.ResultItem item : items) { defaultPrint(line.substring(lastOffset, item.getHighlightStartOffset()), contentType); String linkText = line.substring(item.getHighlightStartOffset(), item.getHighlightEndOffset()); printHyperlink(linkText, item.getHyperlinkInfo()); lastOffset = item.getHighlightEndOffset(); } defaultPrint(line.substring(lastOffset), contentType); } else { defaultPrint(line, contentType); } }