private void setCategory(DataType dt, CategoryPath path) {
		if (dt == null) {
			return;
		}

		try {
			dt.setCategoryPath(path);
		}
		catch (DuplicateNameException e) {
		}
		if (dt instanceof Structure) {
			Structure struct = (Structure) dt;
			DataTypeComponent[] comps = struct.getDefinedComponents();
			for (DataTypeComponent comp : comps) {
				setCategory(comp.getDataType(), path);
			}
		}
		else if (dt instanceof Union) {
			Union union = (Union) dt;
			DataTypeComponent[] comps = union.getComponents();
			for (DataTypeComponent comp : comps) {
				setCategory(comp.getDataType(), path);
			}
		}
		else if (dt instanceof TypeDef) {
			dt = ((TypeDef) dt).getDataType();
			setCategory(dt, path);
		}
		else if (dt instanceof Pointer) {
			setCategory(((Pointer) dt).getDataType(), path);
		}
		else if (dt instanceof Array) {
			Array array = (Array) dt;
			setCategory(array.getDataType(), path);
		}
	}
Set the category of this data type.  

@param struct
@param buf
@return Returns a new structure with the correct category.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/FactoryStructureDataType.java