void (StringBuilder buffer, PsiMethod method, SignaturePlace place) { boolean isTooltip = place == SignaturePlace.ToolTip; boolean generateLink = place == SignaturePlace.Javadoc; generateAnnotations(buffer, method, place, true, false, true); if (!isTooltip) { generateModifiers(buffer, method, true); } String typeParamsString = generateTypeParameters(method, isTooltip); if (!typeParamsString.isEmpty()) { buffer.append(typeParamsString); buffer.append(NBSP); } if (method.getReturnType() != null) { generateType(buffer, method.getReturnType(), method, generateLink, isTooltip); buffer.append(NBSP); } String name = method.getName(); appendStyledSpan(buffer, getHighlightingManager().getMethodDeclarationAttributes(method), name); appendStyledSpan(buffer, getHighlightingManager().getParenthesesAttributes(), "("); PsiParameter[] parameters = method.getParameterList().getParameters(); PsiFile file = method.getContainingFile(); int indent = getIndent(isTooltip, file); if (parameters.length > 0 && !isTooltip) { buffer.append(BR_TAG); } for (int i = 0; i < parameters.length; i++) { buffer.append(StringUtil.repeatSymbol(' ', indent)); PsiParameter parm = parameters[i]; generateAnnotations(buffer, parm, place, false, false, true); generateType(buffer, parm.getType(), method, generateLink, isTooltip); if (!isTooltip) { buffer.append(NBSP); appendStyledSpan(buffer, getHighlightingManager().getParameterAttributes(), parm.getName()); } if (i < parameters.length - 1) { appendStyledSpan(buffer, getHighlightingManager().getCommaAttributes(), ","); buffer.append("\n"); } } if (parameters.length > 0 && !isTooltip) { buffer.append(BR_TAG); } appendStyledSpan(buffer, getHighlightingManager().getParenthesesAttributes(), ")"); PsiClassType[] refs = method.getThrowsList().getReferencedTypes(); if (refs.length > 0) { buffer.append('\n'); appendStyledSpan(buffer, getHighlightingManager().getKeywordAttributes(), "throws"); buffer.append(NBSP); for (int i = 0; i < refs.length; i++) { generateLink(buffer, isTooltip ? refs[i].getPresentableText() : refs[i].getCanonicalText(), null, method, false); if (i < refs.length - 1) { appendStyledSpan(buffer, getHighlightingManager().getCommaAttributes(), ","); buffer.append(NBSP); } } } }