@Override
  public @Nullable ModalityState getCurrentProgressModality() {
    ProgressIndicator indicator = threadTopLevelIndicators.get(Thread.currentThread().getId());
    return indicator == null ? null : indicator.getModalityState();
  }
@Override
  public @Nullable ModalityState getCurrentProgressModality()