/** @param selection */
 public void setAmendingButtonSelection(boolean selection) {
   amending = selection;
   if (!selection) {
     originalChangeId = null;
     authorText.setText(author);
     commitText.setText(commitMessageBeforeAmending);
     commitMessageBeforeAmending = EMPTY_STRING;
   } else {
     getHeadCommitInfo();
     saveOriginalChangeId();
     commitMessageBeforeAmending = commitText.getText();
     commitText.setText(previousCommitMessage);
     if (previousAuthor != null) authorText.setText(previousAuthor);
   }
   refreshChangeIdText();
 }
  /** Initial UI update */
  public void updateUI() {
    if (amending) getHeadCommitInfo();

    commitText.setText(calculateCommitMessage(filesToCommit));
    authorText.setText(getSafeString(author));
    committerText.setText(getSafeString(committer));
    if (amending) {
      authorText.setText(previousAuthor);
      saveOriginalChangeId();
    } else {
      if (!amendAllowed) {
        originalChangeId = null;
      }
      refreshSignedOffBy();
      refreshChangeIdText();
    }
    updateSignedOffButton();
    updateChangeIdButton();
  }
 /** @param selection */
 public void setChangeIdButtonSelection(boolean selection) {
   createChangeId = selection;
   refreshChangeIdText();
 }