piStatus.Internal
  public @NotNull @Nls String format(boolean escapeMnemonics, @Nullable Character mnemonicPrefix, boolean withSuffix) {
    String completeText;
    boolean completeTextIncludesMnemonics;
    if (mnemonicSuffix.isEmpty()) {
      completeText = text;
      completeTextIncludesMnemonics = mnemonicIndex >= 0 && mnemonicIndex < text.length();
    }
    else if (withSuffix) {
      completeText = text + mnemonicSuffix;
      completeTextIncludesMnemonics = mnemonicIndex >= 0 && mnemonicIndex < completeText.length();
    }
    else {
      int ellipsisLength = getEllipsisLength(mnemonicSuffix);
      completeText = ellipsisLength == 0 ? text : text + mnemonicSuffix.substring(mnemonicSuffix.length() - ellipsisLength);
      completeTextIncludesMnemonics = mnemonicIndex >= 0 && mnemonicIndex < text.length();
    }
    if (mnemonicPrefix != null && completeTextIncludesMnemonics) {
      String firstPart = completeText.substring(0, mnemonicIndex);
      String secondPart = completeText.substring(mnemonicIndex);
      return escapeMnemonics // A legacy implementation quirk: we don't escape anything after the actual mnemonic.
             ? StringUtil.escapeMnemonics(firstPart) + mnemonicPrefix + secondPart
             : firstPart + mnemonicPrefix + secondPart;
    }
    else {
      return escapeMnemonics ? StringUtil.escapeMnemonics(completeText) : completeText;
    }
  }
}
piStatus.Internal
  public @NotNull @Nls String format(boolean escapeMnemonics, @Nullable Character mnemonicPrefix, boolean withSuffix) {