@Override
  public void freeze(@NotNull String reason) {
    if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
      ApplicationManager.getApplication().assertIsNonDispatchThread();
    }

    myUpdater.setIgnoreBackgroundOperation(true);
    Semaphore sem = new Semaphore(1);

    invokeAfterUpdate(false, () -> {
      myUpdater.setIgnoreBackgroundOperation(false);
      myUpdater.pause();
      myFreezeName = reason;
      sem.up();
    });

    awaitWithCheckCanceled(sem, ProgressManager.getInstance().getProgressIndicator());
  }
@Override
  public void freeze(@NotNull String reason)