@Override
      public void run(@NotNull final ProgressIndicator indicator) {
        indicator.setIndeterminate(true);
        indicator.pushState();
        try {
          indicator.setText(AntBundle.message("progress.text.register.ant.build.file", file.getPresentableUrl()));
          incModificationCount();
          boolean added = runNonBlocking(() -> {
            try {
              for (AntBuildFile buildFile : getBuildFileList()) {
                final VirtualFile vFile = buildFile.getVirtualFile();
                if (vFile != null && vFile.equals(file)) {
                  result.set(buildFile);
                  return Boolean.FALSE;
                }
              }
              result.set(addBuildFileImpl(file, null));
              updateRegisteredActions();
              return Boolean.TRUE;
            }
            catch (AntNoFileException e) {
              ex.set(e);
            }
            return Boolean.FALSE;
          }, Boolean.FALSE);
          if (added) {
            ApplicationManager.getApplication().invokeLater(() -> myEventDispatcher.getMulticaster().buildFileAdded(result.get()), ModalityState.any());
          }
        }
        catch (ProcessCanceledException ignored) {
        }
        finally {
          indicator.popState();
        }
      }
@Override
      public void run(@NotNull final ProgressIndicator indicator)