String (@NotNull PsiJavaCodeReferenceElement ref) { String name = ref.getReferenceName(); PsiType[] types = ref.getTypeParameters(); if (types.length == 0) { return name != null ? name : ""; } StringBuilder buffer = new StringBuilder(); buffer.append(name); appendTypeArgs(buffer, types, false, false); return buffer.toString(); }