String (@NotNull final PsiSubstitutor substitutor, final PsiTypeParameter[] params) { final boolean space = showSpaceAfterComma(params[0]); StringBuilder buffer = new StringBuilder(); buffer.append("<"); for(int i = 0; i < params.length; i++){ final PsiTypeParameter param = params[i]; final PsiType type = substitutor.substitute(param); if(type == null){ return ""; } if (type instanceof PsiClassType && ((PsiClassType)type).getParameters().length > 0) { buffer.append(((PsiClassType)type).rawType().getPresentableText()).append("<...>"); } else { buffer.append(type.getPresentableText()); } if(i < params.length - 1) { buffer.append(","); if (space) { buffer.append(" "); } } } buffer.append(">"); return buffer.toString(); }