ContentIterator (@NotNull Processor<? super VirtualFile> processor, @Nullable SearchScope searchScope) { return fileOrDir -> { boolean isInScope = ReadAction.compute(() -> { if (searchScope != null && !searchScope.contains(fileOrDir)) return false; if (isFilteredOut(fileOrDir)) return false; return !GeneratedSourcesFilter.isGeneratedSourceByAnyFilter(fileOrDir, myProject); }); return !isInScope || processor.process(fileOrDir); }; }