protected void showPopup() {
    addCurrentTextToHistory();
    if (myPopup != null && myPopup.isVisible()) return;
    if (historyPopupEnabled) {
      doShowPopup();
    }
  }
protected void showPopup()