LookupElement[] (ExpressionContext context) { List<LookupElement> result = new ArrayList<>(); for (SmartTypePointer item : myItems) { PsiType type = TypesUtil.unboxPrimitiveTypeWrapper(item.getType()); if (type == null) continue; PsiTypeLookupItem lookupItem = PsiTypeLookupItem.createLookupItem(type, null, PsiTypeLookupItem.isDiamond(type), IMPORT_FIXER); result.add(lookupItem); } if (myAddDefType) { LookupElementBuilder def = LookupElementBuilder.create(GrModifier.DEF).bold(); if (mySelectDef) { result.add(0, def); } else { result.add(def); } } return result.toArray(LookupElement.EMPTY_ARRAY); }