public static void doRefresh(@NotNull Project project) {
    if (ChangeListManager.getInstance(project).isFreezedWithNotification(null)) return;

    ChangeListManagerEx changeListManager = ChangeListManagerEx.getInstanceEx(project);
    Collection<Change> changesBeforeUpdate = changeListManager.getAllChanges();
    Collection<FilePath> unversionedBefore = changeListManager.getUnversionedFilesPaths();
    boolean wasUpdatingBefore = changeListManager.isInUpdate();

    FileDocumentManager.getInstance().saveAllDocuments();
    invokeCustomRefreshes(project);

    VirtualFileManager.getInstance().asyncRefresh(() -> {
      performRefreshAndTrackChanges(project, changesBeforeUpdate, unversionedBefore, wasUpdatingBefore);
    });
  }
public static void doRefresh(@NotNull Project project)