@Override
  public @Nls String generateDoc(PsiElement element, @Nullable PsiElement originalElement) {
    ExtensionPoint extensionPoint = findExtensionPoint(element);
    if (extensionPoint == null) return null;

    HtmlBuilder defBuilder = new HtmlBuilder();
    defBuilder.append(HtmlChunk.text(extensionPoint.getEffectiveQualifiedName()).bold());
    defBuilder.br().append(DomUtil.getFile(extensionPoint).getName());

    final PsiClass beanClass = extensionPoint.getBeanClass().getValue();
    if (beanClass != null) {
      defBuilder.append(generateClassDoc(beanClass));

      HtmlBuilder bindingRows = new HtmlBuilder();

      new ExtensionPointBinding(beanClass).visit(new ExtensionPointBinding.BindingVisitor() {
        @Override
        public void visitAttribute(@NotNull PsiField field, @NotNull String attributeName, RequiredFlag required) {
          appendFieldBindingText(field, attributeName, required);
        }

        @Override
        public void visitTagOrProperty(@NotNull PsiField field, @NotNull String tagName, RequiredFlag required) {
          visitAttribute(field, "<" + tagName + ">", required);
        }

        @Override
        public void visitXCollection(@NotNull PsiField field,
                                     @Nullable String tagName,
                                     @NotNull PsiAnnotation collectionAnnotation,
                                     RequiredFlag required) {
          visitAttribute(field, "<" + tagName + ">...", required);
        }

        private void appendFieldBindingText(@NotNull PsiField field, @NotNull @NlsSafe String displayName, RequiredFlag required) {
          HtmlChunk hyperLink = createLink(JavaDocUtil.getReferenceText(field.getProject(), field), displayName);

          final String typeText = field.getType().getPresentableText();
          String requiredText = "";
          if (required == RequiredFlag.REQUIRED) {
            requiredText = " " + DevKitBundle.message("extension.point.documentation.field.required.suffix");
          }
          else if (required == RequiredFlag.REQUIRED_ALLOW_EMPTY) {
            requiredText = " " + DevKitBundle.message("extension.point.documentation.field.required.can.be.empty.suffix");
          }
          final String initializer = field.getInitializer() != null ? " = " + field.getInitializer().getText() : "";
          bindingRows.append(createSectionRow(hyperLink, typeText + requiredText + initializer));
        }
      });

      if (!bindingRows.isEmpty()) {
        defBuilder.append(bindingRows.br().wrapWith(DocumentationMarkup.SECTIONS_TABLE));
      }
    }

    HtmlBuilder builder = new HtmlBuilder();
    builder.append(defBuilder.wrapWith(PRE_ELEMENT).wrapWith(DEFINITION_ELEMENT));

    HtmlBuilder platformExplorerLink = new HtmlBuilder();
    platformExplorerLink.appendLink("https://jb.gg/ipe?extensions=" + extensionPoint.getEffectiveQualifiedName(),
                    DevKitBundle.message("extension.point.documentation.link.platform.explorer"));
    builder.append(platformExplorerLink.wrapWith(DocumentationMarkup.CONTENT_ELEMENT));

    final PsiClass extensionPointClass = extensionPoint.getExtensionPointClass();
    if (extensionPointClass != null) { // e.g. ServiceDescriptor
      HtmlBuilder content = new HtmlBuilder();
      content.append(HtmlChunk.text(DevKitBundle.message("extension.point.documentation.implementation.section")).wrapWith("h2"));
      content.append(generateClassDoc(extensionPointClass));
      builder.append(content.wrapWith(DocumentationMarkup.CONTENT_ELEMENT));
    }

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