private boolean setVariableDataType(Variable variable, DataType dataType,
			boolean promptForConflictRemoval) {
		String varType = ((variable instanceof Parameter) ? "Parameter" : "Local Variable");
		Program program = variable.getFunction().getProgram();
		int txId = program.startTransaction("Set " + varType + " Data-type");
		try {
			variable.setDataType(dataType, true, false, SourceType.USER_DEFINED);
			tool.setStatusInfo("");
			return true;
		}
		catch (VariableSizeException e) {
			tool.setStatusInfo(e.getMessage());
			if (e.canForce() && promptForConflictRemoval) {
				String msg = varType + " " + variable.getName() + " size change resulted in \n" +
					e.getMessage() + "\n \nDelete conflicting " + varType + "(s)";
				if (OptionDialog.YES_OPTION == OptionDialog.showYesNoDialog(tool.getActiveWindow(),
					varType + " Conflict", msg)) {
					tool.setStatusInfo("");
					try {
						variable.setDataType(dataType, true, true, SourceType.USER_DEFINED);
						return true;
					}
					catch (InvalidInputException e1) {
						tool.setStatusInfo(e.getMessage());
					}
				}
			}
		}
		catch (InvalidInputException e) {
			tool.setStatusInfo(e.getMessage());
		}
		finally {
			program.endTransaction(txId, true);
		}
		return false;
	}
Get an iterator over all functions overlapping the current selection.
If there is no selection any functions overlapping the current location.

@param context the context 
@return Iterator over functions
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/FunctionPlugin.java