private void copyDataType(Category toCategory, DataType dataType) {

		DataTypeManager dtm = toCategory.getDataTypeManager();
		DataTypeManager nodeDtm = dataType.getDataTypeManager();
		boolean sameManager = (dtm == nodeDtm);

		DataType newDt = !sameManager ? dataType.clone(nodeDtm) : dataType.copy(nodeDtm);

		if (!sameManager && toCategory.isRoot()) {
			// preserve use of source category when copy to root
			toCategory = dtm.createCategory(dataType.getCategoryPath());
		}

		if (sameManager && newDt.getCategoryPath().equals(toCategory.getCategoryPath())) {
			renameAsCopy(toCategory, newDt);
		}

		DataType resolvedDt = toCategory.addDataType(newDt, conflictHandler);
		if (resolvedDt instanceof Pointer || resolvedDt instanceof Array ||
			resolvedDt instanceof BuiltInDataType || resolvedDt instanceof MissingBuiltInDataType) {
			return;
		}

		if (!resolvedDt.getCategoryPath().equals(toCategory.getCategoryPath())) {
			errors.add("Data type copy failed.  Another copy of this data type already exists at " +
				resolvedDt.getPathName());
		}
	}
Any types being newly copied/moved to a suitable archive are eligible for 'association',
which means changes between the two archives will be tracked.  True, the default, signals to
prompt before associating types; false signals not to prompt the user, but to always
associate types.

@param prompt true to prompt; false to not prompt
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataTypeTreeCopyMoveTask.java