class StudioProgressRunner implements ProgressRunner {

  @Override
  public void runSyncWithProgress(@NotNull final ProgressRunnable progressRunnable) {
    UIUtil.invokeAndWaitIfNeeded((Runnable)() -> {
      Task task = new Task.Modal(myProject, myProgressTitle, myCancellable) {
        @Override
        public void run(@NotNull ProgressIndicator indicator) {
          doRunSync(indicator, progressRunnable);
        }
      };
      ProgressManager.getInstance().run(task);
    });
  }

  public  StudioProgressRunner(boolean modal,
                              boolean cancellable,
                              String progressTitle,
                              @Nullable Project project);

}