void initEdit(DataTypeComponent bitfieldDtc, int allocationOffset,
			boolean useExistingAllocationSize) {
		String initialFieldName = null;
		String initialComment = null;
		DataType initialBaseDataType = null;
		int allocationSize = -1;
		if (useExistingAllocationSize) {
			allocationSize = placementComponent.getAllocationByteSize();
		}
		if (bitfieldDtc != null) {
			if (!bitfieldDtc.isBitFieldComponent()) {
				throw new IllegalArgumentException("unsupport data type component");
			}
			initialFieldName = bitfieldDtc.getFieldName();
			initialComment = bitfieldDtc.getComment();
			BitFieldDataType bitfieldDt = (BitFieldDataType) bitfieldDtc.getDataType();
			initialBaseDataType = bitfieldDt.getBaseDataType();
			if (allocationSize < 1) {
				allocationSize = initialBaseDataType.getLength();
			}
			int allocationAdjust = composite.getLength() - allocationOffset - allocationSize;
			if (allocationAdjust < 0) {
				allocationSize += allocationAdjust;
			}
		}
		if (allocationSize < 1) {
			allocationSize = 4;
		}
		placementComponent.updateAllocation(allocationSize, allocationOffset);
		placementComponent.init(bitfieldDtc);
		BitFieldAllocation bitFieldAllocation = placementComponent.getBitFieldAllocation(); // get updated instance
		initControls(initialFieldName, initialComment, initialBaseDataType,
			bitFieldAllocation.getBitSize());
		enableControls(bitfieldDtc != null);
	}
Initialize for edit of existing component or no component if bitfieldDtc is null.
If null an allocation size of 4-bytes will be used but may be adjusted.
@param bitfieldDtc bitfield component or null
@param allocationOffset allocation offset to be used
@param useExistingAllocationSize if true attempt to use existing allocation size
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/BitFieldEditorPanel.java