void (@NotNull Consumer<? super @NotNull PsiFile> consumer) { TodoTreeStructure treeStructure = getTodoTreeStructure(); PsiTodoSearchHelper searchHelper = getSearchHelper(); searchHelper.processFilesWithTodoItems(psiFile -> { if (searchHelper.getTodoItemsCount(psiFile) > 0 && treeStructure.accept(psiFile)) { consumer.accept(psiFile); } return true; }); }