void () { search(element, editor).forEach(new PsiElementProcessorAdapter<>(collectProcessor) { @Override public boolean processInReadAction(PsiElement element) { return !accept(element) || super.processInReadAction(element); } }); }