I wnat to have autocompletion for my application, but there are some pecularities I need to take care of.
The backing of my field is a list of objects, which may have several fields (lets say id and name). Autocompletion should work on on either one. After completion the field should contain the id, not the name, and it should be possible to input something different, namely an id which does not belong to an object of the given list.
Has somebody built something like that for SWT/JFace?
Try looking at the org.eclipse.jface.fieldassist package, it may do what you want. More specifically, you can write your own ContentProposalAdapter, add a IContentProposalListener, and attach it to the modify event of a Text widget, for instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With