private void updateUnion(Union union) throws DuplicateNameException {
			DataType newDt = dataTypeEditor.getCellEditorValueAsDataType();
			DataTypeComponent dtc = composite.getComponent(ordinal);
			DataType resolvedDt = program.getDataTypeManager().resolve(newDt, null);
			String comment = dtc.getComment();
			String fieldName = dtc.getFieldName();
			union.insert(ordinal, resolvedDt);
			union.delete(ordinal + 1);
			dtc = union.getComponent(ordinal);
			dtc.setComment(comment);
			dtc.setFieldName(fieldName);
		}
Sets the pending new datatype and updates the datatype text field to the name of that
datatype.
@param dataType the new pending datatype
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/EditDataFieldDialog.java