public static void refreshAndEnsureFilesValid(@NotNull List<? extends VirtualFile> files) throws Exception {
    VfsUtil.markDirtyAndRefresh(false, false, false, VfsUtilCore.toVirtualFileArray(files));

    for (VirtualFile file : files) {
      if (file != null && !file.isValid()) throw new Exception(DiffBundle.message("cannot.find.file.error", file.getPresentableUrl()));
    }
  }
public static void refreshAndEnsureFilesValid(@NotNull List<? extends VirtualFile> files)