@Nullable
  private static <T> T submitSyncJob(@NotNull Function<? super ProgressIndicator, ? extends T> job) {
    try {
      ourTasksInProgress.incrementAndGet();
      ProgressIndicator parentIndicator = ProgressIndicatorProvider.getGlobalProgressIndicator();
      ProgressIndicator indicator = parentIndicator == null ? new EmptyProgressIndicator(ModalityState.defaultModalityState())
                                                            : ProgressWrapper.wrap(parentIndicator);
      return ProgressManager.getInstance().runProcess(() -> job.apply(indicator), indicator);
    }
    finally {
      ourTasksInProgress.decrementAndGet();
    }
  }
@Nullable
  private static <T> T submitSyncJob(@NotNull Function<? super ProgressIndicator, ? extends T> job)