private static @Nls String generateFieldInfo(PsiField field, PsiSubstitutor substitutor) {
    @Nls StringBuilder buffer = new StringBuilder();
    PsiClass parentClass = field.getContainingClass();

    if (parentClass != null && !(parentClass instanceof PsiAnonymousClass)) {
      appendStyledSignatureFragment(
        buffer,
        JavaDocUtil.getShortestClassName(parentClass, field),
        JavaDocHighlightingManagerImpl.getInstance().getClassDeclarationAttributes(parentClass)
      );
      newLine(buffer);
    }

    JavaDocInfoGenerator docInfoGenerator = getDocInfoGenerator(field.getProject(), false);

    docInfoGenerator.generateTooltipAnnotations(field, buffer);
    generateModifiers(buffer, field);

    docInfoGenerator.generateType(buffer, substitutor.substitute(field.getType()), field, false, true);
    buffer.append(" ");
    appendStyledSignatureFragment(buffer, field.getName(),
                                                                 JavaDocHighlightingManagerImpl.getInstance().getFieldDeclarationAttributes(field));

    generateInitializer(buffer, field);

    JavaDocInfoGenerator.enumConstantOrdinal(buffer, field, parentClass, "\n");
    return buffer.toString();
  }
private static @Nls String generateFieldInfo(PsiField field, PsiSubstitutor substitutor)