@Override
	public boolean applyTo(Program program) {
		Function f = program.getFunctionManager().getFunctionAt(fnEntry);
		if (f == null) {
			status = "Function not found";
			return false;
		}

		Symbol s = program.getSymbolTable().getParameterSymbol(varName, f);
		if (s == null) {
			s = program.getSymbolTable().getLocalVariableSymbol(varName, f);
		}
		if (s == null) {
			status = "Variable not found";
			return false;
		}

		DataType dt = dataType;
		if (dataType instanceof FunctionDefinition || (dataType instanceof TypeDef &&
			((TypeDef) dataType).getDataType() instanceof FunctionDefinition)) {
			dt = new PointerDataType(dataType);
		}

		Variable var = (Variable) s.getObject();
		isParm = var instanceof Parameter;
		try {
			var.setDataType(dt, align, force, source);
		}
		catch (InvalidInputException e) {
			status = e.getMessage();
			return false;
		}
		return true;
	}
@see ghidra.framework.cmd.Command#applyTo(ghidra.framework.model.DomainObject)
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/SetVariableDataTypeCmd.java