@SuppressWarnings("unchecked") // the item better be our type
	private void setTextFromListOnEnterPress() {
		Object selectedItem = list.getSelectedValue();
		if (selectedItem == null) {
			return;
		}

		String textFieldText = getText();
		if (!shouldReplaceTextFieldTextWithSelectedItem(textFieldText, (T) selectedItem)) {
			// The selected item text does not start with the text in the text field, which
			// implies the user has added or changed text and the list has not yet been updated.
			return;
		}

		setTextFromList();
	}
This is more complicated that responding to the user mouse click.  When clicked, the user is
signalling to use the clicked item.  When pressing Enter, they may have been typing and
ignoring the list, so we have to do some validation.
Ghidra/Framework/Docking/src/main/java/docking/widgets/DropDownTextField.java