@Override
  public @Nls String generateDoc(PsiElement element, @Nullable PsiElement originalElement) {
    final Pair<UIThemeMetadata, UIThemeMetadata.UIKeyMetadata> resolve = resolve(element);
    if (resolve == null) return null;

    final UIThemeMetadata uiThemeMetadata = resolve.first;
    final UIThemeMetadata.UIKeyMetadata uiKeyMetadata = resolve.second;

    HtmlBuilder builder = new HtmlBuilder();

    HtmlBuilder definitionBuilder = new HtmlBuilder();
    definitionBuilder.append(HtmlChunk.text(uiKeyMetadata.getKey()).bold());
    definitionBuilder.br().append("[").append(uiThemeMetadata.getName()).append("] - ");
    definitionBuilder.append("[").append(uiThemeMetadata.getPluginId()).append("]");
    HtmlChunk.Element definition = definitionBuilder.wrapWith(PRE_ELEMENT).wrapWith(DEFINITION_ELEMENT);
    builder.append(definition);


    HtmlBuilder contentBuilder = new HtmlBuilder();
    if (uiKeyMetadata.isDeprecated()) {
      contentBuilder.append(
        HtmlChunk.text(DevKitThemesBundle.message("theme.json.documentation.key.deprecated"))
          .bold()
          .wrapWith(HtmlChunk.font("#" + ColorUtil.toHex(JBColor.RED))))
        .append(HtmlChunk.br());
    }
    contentBuilder.append(HtmlChunk.text(StringUtil.notNullize(uiKeyMetadata.getDescription(),
                                                               DevKitThemesBundle.message("theme.json.documentation.key.no.description"))));
    contentBuilder.append(HtmlChunk.br()).append(HtmlChunk.br());
    final HtmlChunk.Element content = contentBuilder.wrapWith(DocumentationMarkup.CONTENT_ELEMENT);
    builder.append(content);


    HtmlBuilder sectionsBuilder = new HtmlBuilder();

    final String source = uiKeyMetadata.getSource();
    if (source != null) {
      appendSection(sectionsBuilder, DevKitThemesBundle.message("theme.json.documentation.section.source.title"), () -> {
        final PsiClassType type = JavaPsiFacade.getElementFactory(element.getProject()).createTypeByFQClassName(source);

        StringBuilder typeBuilder = new StringBuilder();
        JavaDocInfoGeneratorFactory.create(element.getProject(), null).generateType(typeBuilder, type, element);
        return typeBuilder.toString(); //NON-NLS
      });
    }

    final String since = uiKeyMetadata.getSince();
    if (since != null) {
      appendSection(sectionsBuilder, DevKitThemesBundle.message("theme.json.documentation.section.since.title"), since);
    }
    final HtmlChunk.Element sections = sectionsBuilder.wrapWith(DocumentationMarkup.SECTIONS_TABLE);
    builder.append(sections);

    return builder.toString();
  }
@Override
  public @Nls String generateDoc(PsiElement element, @Nullable PsiElement originalElement)