@NotNull
  public static AccessToken workingTreeChangeStarted(@NotNull Project project,
                                                     @Nullable @NlsContexts.Label String activityName,
                                                     @Nullable ActivityId activityId) {
    BackgroundTaskUtil.syncPublisher(BatchFileChangeListener.TOPIC).batchChangeStarted(project, activityName);
    LocalHistoryAction action = ObjectUtils.doIfNotNull(activityId, id -> {
      return LocalHistory.getInstance().startAction(activityName, id);
    });
    return new AccessToken() {
      @Override
      public void finish() {
        if (action != null) action.finish();
        BackgroundTaskUtil.syncPublisher(BatchFileChangeListener.TOPIC).batchChangeCompleted(project);
      }
    };
  }
@NotNull
  public static AccessToken workingTreeChangeStarted(@NotNull Project project,
                                                     @Nullable @NlsContexts.Label String activityName,
                                                     @Nullable ActivityId activityId)