public void setName(String name) throws DuplicateNameException, InvalidNameException {
		if (name.equals(currentName)) {
			return;
		}
		currentName = name;

		if (viewComposite != null) {
			validName = false;
			int txId = viewDTM.startTransaction("Set Name");
			try {
				viewComposite.setName(name);
			}
			finally {
				viewDTM.endTransaction(txId, true);
			}
			checkName(name);
			validName = true;
		}

		boolean nameModified = !currentName.equals(getOriginalDataTypeName());
		updateAndCheckChangeState();

		// Notify any listeners that the name modification state has changed.
		int type = (nameModified) ? CompositeEditorModelListener.COMPOSITE_MODIFIED
				: CompositeEditorModelListener.COMPOSITE_UNMODIFIED;
		editorStateChanged(type);
	}
Sets the name for the composite data type being edited.

@param name the new name.

@throws DuplicateNameException if the name already exists.
@throws InvalidNameException if the name is invalid
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompositeEditorModel.java