private boolean closeQuery() {
      if (myContent == null) {
        return true;
      }

      final AntBuildMessageView messageView = myContent.getUserData(KEY);

      if (messageView == null || messageView.isStoppedOrTerminateRequested()) {
        return true;
      }

      if (myCloseAllowed) {
        return true;
      }

      final int result = Messages.showYesNoCancelDialog(
        AntBundle.message("ant.process.is.active.terminate.confirmation.text"),
        AntBundle.message("close.ant.build.messages.dialog.title"), Messages.getQuestionIcon()
      );

      if (result == 0) { // yes
        messageView.stopProcess();
        myCloseAllowed = true;
        return true;
      }

      if (result == 1) { // no
        // close content and leave the process running
        myCloseAllowed = true;
        return true;
      }

      return false;
    }
private boolean closeQuery()