Runnable (@NotNull VFileEvent event, @NotNull List<? extends FilePropertyPusher<?>> pushers) { List<IndexableFileScanner> scanners = IndexableFileScanner.EP_NAME.getExtensionList(); if (pushers.isEmpty() && scanners.isEmpty()) { return null; } return () -> { // delay calling event.getFile() until background to avoid expensive VFileCreateEvent.getFile() in EDT VirtualFile dir = getFile(event); ProjectFileIndex fileIndex = ReadAction.compute(() -> ProjectFileIndex.getInstance(myProject)); if (dir != null && ReadAction.compute(() -> fileIndex.isInContent(dir)) && !ProjectUtil.isProjectOrWorkspaceFile(dir)) { doPushRecursively(pushers, scanners, new ProjectIndexableFilesIteratorImpl(dir)); } }; }