void (@Nullable LookupElement oldItem, @Nullable LookupElement currentItem) { if (oldItem != currentItem && !myListeners.isEmpty()) { LookupEvent event = new LookupEvent(this, currentItem, (char)0); for (LookupListener listener : myListeners) { listener.currentItemChanged(event); } } myPreview.updatePreview(currentItem); }