void (PsiElement originalElement, @Nls StringBuilder buffer, PsiVariable variable) { if (variable instanceof PsiField) { final PsiClass parentClass = ((PsiField)variable).getContainingClass(); if (parentClass != null) { appendElementLink(buffer, parentClass, JavaDocUtil.getShortestClassName(parentClass, variable)); newLine(buffer); } generateModifiers(buffer, variable); } final PsiType type = variable instanceof GrVariable ? ((GrVariable)variable).getDeclaredType() : variable.getType(); appendTypeString(buffer, calcSubstitutor(originalElement).substitute(type), originalElement, false); buffer.append(" "); TextAttributes varAttributes = variable instanceof PsiField ? GroovyDocHighlightingManager.getInstance().getFieldDeclarationAttributes((PsiField)variable) : GroovyDocHighlightingManager.getInstance().getLocalVariableAttributes(); appendStyledSpan(buffer, varAttributes, variable.getName()); if (variable instanceof GrVariable) { newLine(buffer); while (originalElement != null) { PsiReference ref = originalElement.getReference(); if (ref != null && ref.resolve() != null) break; originalElement = originalElement.getParent(); } if (originalElement != null) { appendInferredType(originalElement, (GrVariable)variable, buffer, false); } } }