private boolean applyDataSettings(Data data) throws CodeUnitInsertionException {

		DataType dt = data.getBaseDataType();
		Settings settings = data;
		Settings defaultSettings = dt.getDefaultSettings();
		if (!(Scalar.class.equals(data.getValueClass())) ||
			!(dt instanceof AbstractIntegerDataType)) {
			msg = "Unsupported data type for convert: " + data.getDataType().getDisplayName();
			return false;
		}

		int formatChoice = action.getFormatChoice();

		// Only change data-type when decimal signed/unsigned mode differs from data type
		// since other formats are always unsigned regardless of data type
		if (formatChoice == FormatSettingsDefinition.DECIMAL) {
			AbstractIntegerDataType numDt = (AbstractIntegerDataType) dt;
			if (action.isSignedChoice()) {
				if (!numDt.isSigned()) {
					DataType signedDataType = numDt.getOppositeSignednessDataType();
					createData(data, signedDataType);
				}
			}
			else if (numDt.isSigned()) {
				DataType unsignedDataType = numDt.getOppositeSignednessDataType();
				createData(data, unsignedDataType);
			}
		}

		if (FormatSettingsDefinition.DEF.getChoice(defaultSettings) == formatChoice) {
			FormatSettingsDefinition.DEF.clear(settings);
		}
		else {
			FormatSettingsDefinition.DEF.setChoice(settings, formatChoice);
		}

		return true;
	}
Constructor for the command to convert scalars and data to the user chosen format. The
command will work at a single address or over a selection in the case where the current
location refers to an instruction.  
<br>
Data convert only supports signed/unsigned and defined FormatSettingsDefinitions
on data whose data type is based upon the AbstractIntegerDataType.

@param action The action to pull information from
@param context The action context
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/ConvertCommand.java