LookupElement (@NotNull PsiType constructedType) { constructedType = TypeConversionUtil.erasure(constructedType); PsiClass psiClass = PsiUtil.resolveClassInType(constructedType); return LookupElementBuilder .create(constructedType, constructedType.getPresentableText() + "::new") .withTypeText(myFunctionalInterfaceType.getPresentableText()) .withTailText(psiClass != null ? " (" + PsiFormatUtil.getPackageDisplayName(psiClass) + ")" : null, true) .withPsiElement(psiClass) .withIcon(AllIcons.Nodes.MethodReference) .withInsertHandler(CONSTRUCTOR_REF_INSERT_HANDLER) .withAutoCompletionPolicy(AutoCompletionPolicy.NEVER_AUTOCOMPLETE); }