void (@Nullable Project project, @NotNull BiConsumer<? super VirtualFile, ? super AreaInstance> consumer) { VirtualFile ancestor = ProjectFileNode.findBaseDir(project); if (ancestor != null && project == ProjectFileNode.findArea(ancestor, project)) { consumer.accept(ancestor, project); } if (project != null && !project.isDisposed()) { for (Module module : ModuleManager.getInstance(project).getModules()) { if (!module.isDisposed()) { for (VirtualFile file : ModuleRootManager.getInstance(module).getContentRoots()) { consumer.accept(file, module); } } } } for (RootType rootType : RootType.getAllRootTypes()) { if (rootType.isHidden()) continue; String path = ScratchFileService.getInstance().getRootPath(rootType); VirtualFile file = LocalFileSystem.getInstance().findFileByPath(path); if (file == null) continue; consumer.accept(file, ApplicationManager.getApplication()); } }