boolean apply(CompositeChangeListener listener) {

		if (!checkValidBaseDataType()) {
			DropDownSelectionTextField<DataType> dtChoiceTextField =
				dtChoiceEditor.getDropDownTextField();
			dtChoiceTextField.selectAll();
			dtChoiceTextField.requestFocus();
			return false;
		}

		boolean deleteConflicts = false;
		if (placementComponent.hasApplyConflict()) {
			long allocationSize = (Long) allocSizeModel.getValue();
			int option = OptionDialog.showOptionDialog(this, "Bitfield Conflict(s)",
				"Bitfield placement conflicts with one or more components.\n" +
					"Would you like to delete conflicts or move conflicts by " + allocationSize +
					" bytes?",
				"Delete Conflicts", "Move Conflicts", OptionDialog.WARNING_MESSAGE);
			if (option == OptionDialog.CANCEL_OPTION) {
				return false;
			}
			deleteConflicts = (option == OptionDialog.OPTION_ONE);
		}

		boolean doDeleteConflicts = deleteConflicts;
		this.composite.getDataTypeManager()
				.withTransaction("Apply Bitfield",
					() -> placementComponent.applyBitField(baseDataType,
						fieldNameTextField.getText().trim(), fieldCommentTextField.getText().trim(),
						doDeleteConflicts, listener));

		enableControls(false);
		return true;
	}
@return true if actively adding a bitfield
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/BitFieldEditorPanel.java