private boolean runTargetSynchronously(CompileContext compileContext, final DataContext dataContext, ExecutionEvent event) {
    ApplicationManager.getApplication().assertIsNonDispatchThread();
    final ProgressIndicator progress = compileContext.getProgressIndicator();
    progress.pushState();
    try {
      if (!isInitialized()) {
        progress.setText(AntBundle.message("progress.text.loading.ant.config"));
        ensureInitialized();
      }

      final AntBuildTarget target = getTargetForEvent(event);
      if (target == null) {
        // no task assigned
        return true;
      }

      if (ExecuteAfterCompilationEvent.TYPE_ID.equals(event.getTypeId()) && compileContext.getMessageCount(CompilerMessageCategory.ERROR) > 0) {
        compileContext.addMessage(
          CompilerMessageCategory.INFORMATION, AntBundle.message("message.skip.ant.target.after.compilation.errors", target.getDisplayName()), null, -1, -1
        );
        return true;
      }

      progress.setText(AntBundle.message("progress.text.running.ant.tasks"));
      return executeTargetSynchronously(dataContext, target);
    }
    finally {
      progress.popState();
    }
  }
private boolean runTargetSynchronously(CompileContext compileContext, final DataContext dataContext, ExecutionEvent event)