void (@Nullable String filter, @NotNull LoadingDecorator decorator) { decorator.stopLoading(); if (myFilterFuture != null) { myFilterFuture.cancel(true); myFilterFuture = null; } if (StringUtil.isEmpty(filter)) { applyFilteredRevisions(null); } else { decorator.startLoading(false); updateEditorSearch(); myFilterFuture = ApplicationManager.getApplication().executeOnPooledThread(() -> { Set<Long> revisions = new HashSet<>(); FileHistoryDialogModel model = myModel; if (model != null) { model.processContents((r, c) -> { if (Thread.currentThread().isInterrupted()) return false; if (c != null && StringUtil.containsIgnoreCase(c, filter)) { revisions.add(r.getChangeSetId()); } return true; }); } decorator.stopLoading(); UIUtil.invokeLaterIfNeeded(() -> applyFilteredRevisions(revisions)); }); } }