boolean (@NotNull VirtualFile file) { if (myDelegate != null) { boolean shouldVisit = myDelegate.accept(file); if (!shouldVisit) { myNumberOfSkippedFiles.incrementAndGet(); } return shouldVisit; } if (file instanceof VirtualFileWithId) { int fileId = ((VirtualFileWithId)file).getId(); if (fileId > 0) { boolean wasVisited = myVisitedFileSet.set(fileId); if (wasVisited) { myNumberOfSkippedFiles.incrementAndGet(); } return !wasVisited; } } myNumberOfSkippedFiles.incrementAndGet(); return false; }