@Override
	public boolean applyTo(Program program) {

		FunctionManager functionManager = program.getFunctionManager();
		FunctionTagManager tagManager = functionManager.getFunctionTagManager();
		FunctionTag tag = tagManager.getFunctionTag(tagName);

		if (tag == null) {
			errorMsg = "Function Tag not found: " + tagName;
			return false;
		}

		if (field == TAG_NAME_CHANGED) {
			tag.setName(newVal);
		}
		else {
			tag.setComment(newVal);
		}

		return true;
	}
Constructor

@param tagName the name of the tag to change
@param newVal the new value to set
@param field the field to set
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/ChangeFunctionTagCmd.java