diff --git a/docs/_includes/language_info.html b/docs/_includes/language_info.html
new file mode 100644
index 0000000000..b36db72904
--- /dev/null
+++ b/docs/_includes/language_info.html
@@ -0,0 +1,11 @@
+
+ Name: {{include.name}}
+
+
+ - Implementation: {% jdoc include.implementation %}
+ - id: {{include.id}}
+ - PMD: {% if include.supports_pmd %}✔️{% else %}❌{% endif %}
+ - CPD: {% if include.supports_cpd %}✔️{% else %}❌{% endif %}
+
+
+
diff --git a/docs/_plugins/javadoc_tag.rb b/docs/_plugins/javadoc_tag.rb
index b3e79329f9..2016c442f7 100644
--- a/docs/_plugins/javadoc_tag.rb
+++ b/docs/_plugins/javadoc_tag.rb
@@ -106,16 +106,25 @@ class JavadocTag < Liquid::Tag
def initialize(tag_name, doc_ref, tokens)
super
- # sanitize a little
- doc_ref.delete! " \"'"
+ @doc_ref = doc_ref
+ end
- arr = doc_ref.split("#") # split into fqcn + member suffix
+ def render(var_ctx)
+ # maybe the parameter is actually a variable - try to resolve it first
+ if var_ctx.key?(@doc_ref)
+ @doc_ref = var_ctx[@doc_ref]
+ end
+
+ # sanitize a little
+ @doc_ref.delete! " \"'"
+
+ arr = @doc_ref.split("#") # split into fqcn + member suffix
@type_fqcn = arr[0]
@member_suffix = arr[1] || "" # default to empty string
unless Regexp.new('(!\w*!)?' + Regexp.union(JDocNamespaceDeclaration::NAMESPACED_FQCN_REGEX, JDocNamespaceDeclaration::SYM_REGEX).source ) =~ @type_fqcn
- fail "Wrong syntax for type reference, expected eg nspace::a.b.C, !opts!nspace::a.b.C, or :nspace"
+ fail "Wrong syntax for type reference, expected eg nspace::a.b.C, !opts!nspace::a.b.C, or :nspace, but got \'" + @type_fqcn + "\'"
end
# If no options, then split produces [@type_fqcn]
@@ -130,9 +139,6 @@ class JavadocTag < Liquid::Tag
elsif tag_name == "jdoc_old"
@use_previous_api_version = true
end
- end
-
- def render(var_ctx)
artifact_name, @type_fqcn = JDocNamespaceDeclaration::parse_fqcn(@type_fqcn, var_ctx)
resolved_type = JavadocTag::fqcn_type(artifact_name, @type_fqcn)
diff --git a/docs/pages/pmd/languages/apex.md b/docs/pages/pmd/languages/apex.md
index 6ba6bf4ed3..cf93b81a65 100644
--- a/docs/pages/pmd/languages/apex.md
+++ b/docs/pages/pmd/languages/apex.md
@@ -7,14 +7,7 @@ tags: [languages]
summary: "Apex-specific features and guidance"
---
-Implementation: {% jdoc apex::lang.apex.ApexLanguageModule %}
-Name: Apex
-id: apex
-PMD: yes
-CPD: yes
-
-
-{% include warning.html content="Todo for pmd 7" %}
+{% include language_info.html name='Apex' id='apex' implementation='apex::lang.apex.ApexLanguageModule' supports_pmd='✔️' supports_cpd='✔️' %}
## Metrics framework
diff --git a/docs/pages/pmd/languages/java.md b/docs/pages/pmd/languages/java.md
index aca60936f1..e9aaaea0a0 100644
--- a/docs/pages/pmd/languages/java.md
+++ b/docs/pages/pmd/languages/java.md
@@ -7,6 +7,8 @@ tags: [languages]
summary: "Java-specific features and guidance"
---
+{% include language_info.html name='Java' id='java' implementation='java::lang.java.JavaLanguageModule' supports_pmd='✔️' supports_cpd='✔️' %}
+
{% include warning.html content="WIP, todo for pmd 7" %}
## Overview of supported Java language versions