public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel renderer = (JLabel) defaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if(value instanceof LookupElement) {
LookupElementPresentation lookupElementPresentation = new LookupElementPresentation();
((LookupElement) value).renderElement(lookupElementPresentation);
renderer.setText(lookupElementPresentation.getItemText());
renderer.setIcon(lookupElementPresentation.getIcon());
renderer.setToolTipText(lookupElementPresentation.getTypeText());
}
return renderer;
}