@Override
	public void dataTypeDeleted(DataType dt) {
		lock.acquire();
		try {
			checkDeleted();
			boolean changed = false;
			int n = components.size();
			for (int i = n - 1; i >= 0; i--) {
				DataTypeComponentDB dtc = components.get(i);
				if (dtc.isBitFieldComponent()) {
					// Do not allow bitfield to be destroyed
					// If base type is removed - revert to primitive type
					BitFieldDataType bitfieldDt = (BitFieldDataType) dtc.getDataType();
					if (bitfieldDt.getBaseDataType() == dt) {
						AbstractIntegerDataType primitiveDt = bitfieldDt.getPrimitiveBaseDataType();
						dataMgr.blockDataTypeRemoval(primitiveDt);
						if (primitiveDt != dt && updateBitFieldDataType(dtc, dt, primitiveDt)) {
							dtc.setComment(
								prependComment("Type '" + dt.getDisplayName() + "' was deleted",
									dtc.getComment()));
							changed = true;
						}
					}
				}
				else if (dtc.getDataType() == dt) {
					setComponentDataType(dtc, BadDataType.dataType, i);
					dtc.setComment(prependComment("Type '" + dt.getDisplayName() + "' was deleted",
						dtc.getComment()));
					changed = true;
				}
			}
			// repack not needed for non-packed structure - nothing should move
			if (changed && (!isPackingEnabled() || !repack(false, true))) {
				dataMgr.dataTypeChanged(this, false);
			}
		}
		catch (IOException e) {
			dataMgr.dbError(e);
		}
		finally {
			lock.release();
		}
	}
Replaces the internal components of this structure with components of the given structure
including packing and alignment settings.

@param struct structure to be copied
@param notify provide notification if true
@throws DataTypeDependencyException if circular dependency detected
@throws IOException if database IO error occurs
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/StructureDB.java