@Override
	public void dataTypeMoved(DataTypeManager dataTypeManager, DataTypePath oldPath,
			DataTypePath newPath) {

		if (dataTypeManager != originalDTM) {
			throw new AssertException("Listener only supports original DTM");
		}

		if (!isLoaded()) {
			return;
		}

		if (oldPath.getDataTypeName().equals(newPath.getDataTypeName())) {
			return;
		}

		// Check for managed datatype changing
		DataType originalDt = originalDTM.getDataType(newPath);
		if (!(originalDt instanceof DatabaseObject)) {
			return;
		}
		DataType dt = viewDTM.findMyDataTypeFromOriginalID(originalDTM.getID(originalDt));
		if (dt == null) {
			return;
		}

		OffsetPairs offsetSelection = getRelOffsetSelection();
		try {
			dt.setName(newPath.getDataTypeName());

			CategoryPath newCategoryPath = newPath.getCategoryPath();
			CategoryPath oldCategoryPath = oldPath.getCategoryPath();
			if (!newCategoryPath.equals(oldCategoryPath)) {
				dt.setCategoryPath(newCategoryPath);
			}
		}
		catch (InvalidNameException | DuplicateNameException e) {
			Msg.error(this, "Unexpected Exception: " + e.getMessage(), e);
		}
		fireTableDataChanged();
		componentDataChanged();
		setRelOffsetSelection(offsetSelection);
	}
Adds the specified data type at the specified component index. Whether
an insert or replace occurs depends on whether the indicated index is
in a selection and whether in locked or unlocked mode.

@param index the component index of where to add the data type.
@param dt the data type to add

@return true if the component is added, false if it doesn't.
@throws UsrException if add fails
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackEditorModel.java