}
private void registerSelectionListener(Searchable searchable) {
if (searchable.getComponent() instanceof JList) {
final JList list = (JList) getSearchable().getComponent();
list.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
int index = list.getSelectedIndex();
if (index != -1) {
getTextComponent().setText(getSearchable().convertElementToString(list.getModel().getElementAt(index)));
highlightCompletedText(0);