private static String combingToolTipTextWithKeyBinding(String toolTipText,
			String keyBindingText) {
		StringBuilder buffy = new StringBuilder(toolTipText);
		if (StringUtilities.startsWithIgnoreCase(toolTipText, "<html>")) {
			String endHTMLTag = "</html>";
			int closeTagIndex = StringUtils.indexOfIgnoreCase(toolTipText, endHTMLTag);
			if (closeTagIndex < 0) {
				// no closing tag, which is acceptable
				buffy.append(START_KEYBINDING_TEXT)
						.append(keyBindingText)
						.append(END_KEYBINDNIG_TEXT);
			}
			else {
				// remove the closing tag, put on our text, and then put the tag back on
				buffy.delete(closeTagIndex, closeTagIndex + endHTMLTag.length() + 1);
				buffy.append(START_KEYBINDING_TEXT)
						.append(keyBindingText)
						.append(END_KEYBINDNIG_TEXT)
						.append(endHTMLTag);
			}
			return buffy.toString();
		}

		// plain text (not HTML)
		return toolTipText + " (" + keyBindingText + ")";
	}
Sets the given button's tooltip text to match that of the given action
@param button the button
@param action the action
Ghidra/Framework/Docking/src/main/java/docking/menu/DockingToolBarUtils.java