private String getHtmlText(DockingActionIf action, String category, boolean isSelected) {
			String actionDisplayName = getActionDisplayName(action, category);
			String escapedActionName = HTMLUtilities.escapeHTML(actionDisplayName);
			String disabledText = "";

			StringBuilder builder = new StringBuilder("<html>");

			Color fgName = getForeground(); // defaults to list foreground; handles selected state
			Color fgKeyBinding = isSelected ? getForeground() : Messages.HINT;

			ActionContext context = model.getContext();
			if (!(action.isValidContext(context) && action.isEnabledForContext(context))) {
				fgName = isSelected ? getForeground() : Colors.FOREGROUND_DISABLED;
				fgKeyBinding = isSelected ? getForeground() : Colors.FOREGROUND_DISABLED;
				disabledText = isSelected ? " <I>disabled</I>" : "";
			}

			builder.append(HTMLUtilities.colorString(fgName, escapedActionName));
			builder.append(colorKeyBindingString(fgKeyBinding, action));
			builder.append(disabledText);

			return builder.toString();
		}
Class for actually invoking the selected action. Creating an instance of this class
causes a listener to be added for when focus changes. This is because we don't want
to invoke the selected action until after this dialog has finished closing and focus
has been returned to the original component that had focus before this dialog was invoked.
Ghidra/Framework/Docking/src/main/java/docking/actions/dialog/ActionChooserDialog.java