private void fireCurrentItemChanged( @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); } } }
private void fireLookupCanceled(final boolean explicitly) { if (!myListeners.isEmpty()) { LookupEvent event = new LookupEvent(this, explicitly); for (LookupListener listener : myListeners) { try { listener.lookupCanceled(event); } catch (Throwable e) { LOG.error(e); } } } }
public void fireItemSelected(@Nullable final LookupElement item, char completionChar) { PsiDocumentManager.getInstance(myProject).commitAllDocuments(); if (!myListeners.isEmpty()) { LookupEvent event = new LookupEvent(this, item, completionChar); for (LookupListener listener : myListeners) { try { listener.itemSelected(event); } catch (Throwable e) { LOG.error(e); } } } }