@Override
	protected void fixupComponents() throws IOException {
		boolean isPacked = isPackingEnabled();
		boolean forceRepack = false;
		boolean changed = false;
		boolean warn = false;
		int n = components.size();
		for (int i = 0; i < n; i++) {
			DataTypeComponentDB dtc = components.get(i);
			DataType dt = dtc.getDataType();
			if (dt instanceof Dynamic) {
				continue; // length can't change
			}
			if (dt instanceof BitFieldDataType) {
				// Always repack if bitfields present and packing enabled
				forceRepack |= isPacked;
				continue;
			}
			int dtcLen = dtc.getLength();
			int length = getPreferredComponentLength(dt, dtcLen, getAvailableComponentSpace(i));
			if (length < 0) {
				continue; // illegal condition - skip
			}
			if (dtcLen != length) {
				if (isPacked) {
					changed = true;
					break;
				}
				else if (length < dtcLen) {
					dtc.setLength(length, true);
					shiftOffsets(i + 1, dtcLen - length, 0); // updates structure record and last modified time
					changed = true;
				}
				else if (length > dtcLen) {
					int consumed = consumeBytesAfter(i, length - dtcLen); // updates component record
					if (consumed > 0) {
						shiftOffsets(i + 1, -consumed, 0); // updates structure record and last modified time
						changed = true;
					}
				}
				if (dtc.getLength() != length) {
					warn = true;
				}
			}
		}
		if (changed || forceRepack) {
			// Do not notify parents - must be invoked in composite dependency order
			// Treat as an auto-change as a result of data organization change
			changed |= repack(true, false);
		}
		if (changed) {
			compositeAdapter.updateRecord(record, false); // force record update
			dataMgr.dataTypeChanged(this, true);
		}
		if (warn) {
			Msg.warn(this, "Failed to resize one or more structure components: " + getPathName());
		}
	}
Get the available space for an existing defined component in relation to the next defined
component or the end of the structure.  Method should be used in conjunction with
{@link #consumeBytesAfter(int, int)} and/or {@link #shiftOffsets(int, int, int)} for
non-packed structure use.  This method is intended to supplt the maxLength parameter
for the {@link #getPreferredComponentLength(DataType, int, int)} method call.

@param index defined components index
@return available space for this component (i.e., maxLength). {@link Integer#MAX_VALUE}
is returned if last component in non-packed structure, or -1 if structure is packed.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/StructureDB.java