I’m searching for an implementation of a Combo Box in SWT that will allow me to set the the entries in it with a list of any Object, in a similar way to Trees and Tables.
Ideally I want the String when dropped down to be able to be different to the final String once selected. IE a drop down to select a person that shows their age next to their name in the list, but only their name when selected and placed in the box.
All I can find that exists are String based Combo Boxes with no way of describing different display options, so I guess i’s going to have to build a new component if I want the thing to work, but I was hoping someone has already implemented such a thing (since I’ve seen this sort of functionality in some applications) and I just can’t find it?
I hope to create something like this.

The JFace
ComboViewerseems to be what you want. It is backed by aModelProviderwhich holds your Objects. ALabelProvideris used to display the text inside the combo.Here is an excellent tutorial by Vogella.
Here is an example that does what you want. It basically saves the current combo selection if a boolean of the displayed objects: