void (LookupElementPresentation presentation, boolean showClass, boolean showPackage, PsiSubstitutor substitutor) { final String className = myContainingClass == null ? "???" : myContainingClass.getName(); final String memberName = myMember.getName(); boolean constructor = myMember instanceof PsiMethod && ((PsiMethod)myMember).isConstructor(); if (constructor) { presentation.setItemText("new " + memberName); if (myContainingClass != null && myContainingClass.getTypeParameters().length > 0) { presentation.appendTailText("<>", false); } } else if (showClass && StringUtil.isNotEmpty(className)) { presentation.setItemText(className + "." + memberName); } else { presentation.setItemText(memberName); } final String qname = myContainingClass == null ? "" : myContainingClass.getQualifiedName(); String pkg = qname == null ? "" : StringUtil.getPackageName(qname); String location = showPackage && StringUtil.isNotEmpty(pkg) ? " (" + pkg + ")" : ""; final String params = myMergedOverloads ? "(...)" : myMember instanceof PsiMethod ? getMethodParameterString((PsiMethod)myMember, substitutor) : ""; presentation.appendTailText(params, false); if (myShouldImport && !constructor && StringUtil.isNotEmpty(className)) { presentation.appendTailText(" in " + className + location, true); } else { presentation.appendTailText(location, true); } PsiType type = getDeclaredType(myMember, substitutor); if (type != null) { presentation.setTypeText(type.getPresentableText()); } }