private void updateActionNameAndDescription() {
		String actionName = getName();
		String description = actionName;
		String menuName = actionName;

		if (activeProgram != null) {
			menuName = actionName + " " + activeProgram.getDomainFile().getName();
			description = actionName;
		}

		if (canPerformAction(activeProgram)) {
			String programName = activeProgram.getDomainFile().getName();
			String undoRedoDescription = getUndoRedoDescription(activeProgram);
			String text = actionName + " " +
				HTMLUtilities.escapeHTML(undoRedoDescription + " (" + programName + ")");
			description = HTMLUtilities.toWrappedHTML(text);
		}

		getMenuBarData().setMenuItemNamePlain(menuName);
		setDescription(description);
	}
Abstract base class for the undo and redo actions. These actions add a listener to the
current context program in order to know when to update their enabled state and description.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/progmgr/AbstractUndoRedoAction.java