private boolean updateDataType() {

			if (!hasDataTypeChange()) {
				return true;
			}

			try {
				if (composite instanceof Structure struct) {
					updateStructure(struct);
				}
				else if (composite instanceof Union union) {
					updateUnion(union);
				}
				return true;
			}
			catch (DuplicateNameException e) {
				statusMessage = "Duplicate field name";
				return false;
			}
			catch (Exception e) {
				statusMessage = e.getMessage();
				return false;
			}
		}
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