private void addEmptyItem(CollectionListModel<LookupElement> model) { LookupItem<String> item = new EmptyLookupItem( myCalculating ? " " : LangBundle.message("completion.no.suggestions"), false); myMatchers.put(item, new CamelHumpMatcher("")); model.add(item); updateLookupWidth(item); requestResize(); }
public boolean addItem(LookupElement item, PrefixMatcher matcher) { LookupElementPresentation presentation = renderItemApproximately(item); if (containsDummyIdentifier(presentation.getItemText()) || containsDummyIdentifier(presentation.getTailText()) || containsDummyIdentifier(presentation.getTypeText())) { return false; } myMatchers.put(item, matcher); updateLookupWidth(item, presentation); synchronized (myList) { myArranger.addElement(this, item, presentation); } return true; }
public void updateLookupWidth(LookupElement item) { updateLookupWidth(item, renderItemApproximately(item)); }