private void updateTextFieldTextForClearedSelection(JTextField comboBoxTextField,
			Object selectedItem) {
		if (selectedItem == null) {
			return; // nothing to add to the text field
		}

		String text = comboBoxTextField.getText();
		String newText = selectedItem.toString();
		if (!text.equals(newText)) {
			comboBoxTextField.setText(newText);
		}
	}
A fix for the following series of events:
<ol>
	<li>The user selects an item</li>
 <li>The user deletes the text</li>
 <li>setSelectedItem(Object) method is called with the same item</li>
</ol>

In that above series of steps, the text will still be empty, as the user deleted it *and*
the call to setSelectedItem(Object) had no effect because the base class assumed that the
item is already selected.

<p>
This method exists to make sure, in that case, that the text of the field matches the
selected item.
Ghidra/Framework/Docking/src/main/java/docking/widgets/combobox/GhidraComboBox.java