void () { synchronized (this) { for (Pair<LookupElement, LookupElementPresentation> pair: batchItems) { super.addElement(pair.first, pair.second); } batchItems.clear(); } trimToLimit(createContext()); }