Collection<VirtualFile> () { ReadAction.run(() -> { processFilesInReadAction(info -> { myFilesToUpdate.put(info.getFileId(), info.isFileRemoved() ? new DeletedVirtualFileStub(((VirtualFileWithId)info.getFile())) : info.getFile()); return true; }); }); return new ArrayList<>(myFilesToUpdate.values()); }