@Override
		public void mouseClicked(MouseEvent e) {
			if (bitOffsetInput.isEnabled() || e.isConsumed() || e.getClickCount() != 2 ||
				!placementComponent.isWithinBitCell(e.getPoint())) {
				return;
			}
			BitAttributes bitAttributes = placementComponent.getBitAttributes(e.getPoint());
			if (bitAttributes != null) {
				DataTypeComponent dtc = bitAttributes.getDataTypeComponent(true);
				if (dtc == null || !dtc.isBitFieldComponent()) {
					return;
				}
				e.consume();
				initEdit(dtc, placementComponent.getAllocationOffset(), true);
			}
		}
<code>BitFieldEditorPanel</code> provides the ability to add or modify bitfields
within non-packed structures.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/BitFieldEditorPanel.java