Object (final Object variant, final String name, final PsiElement psiElement) { final LookupElementBuilder builder; if (psiElement != null) { builder = LookupElementBuilder.create(psiElement, name); } else { builder = LookupElementBuilder.create(name); } return builder.withIcon(ElementPresentationManager.getIcon(variant)); }