From afaa198237c2e906d24f300ed5f2cfcf7e9fde33 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Mon, 11 Mar 2024 17:50:27 +0100 Subject: [PATCH] [doc] Add tag jdoc_package_old --- docs/_plugins/javadoc_tag.rb | 8 +++++--- docs/_plugins/jdoc_namespace_tag.rb | 4 +++- docs/pages/release_notes_pmd7.md | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/_plugins/javadoc_tag.rb b/docs/_plugins/javadoc_tag.rb index ef7eb743a1..6d801e1bda 100644 --- a/docs/_plugins/javadoc_tag.rb +++ b/docs/_plugins/javadoc_tag.rb @@ -10,7 +10,7 @@ require_relative 'jdoc_namespace_tag' # though, links on the published jekyll site will work. # To refer to the previous API version, e.g. to refer to a type or member that was removed, # the tag "jdoc_old" may be used. This tag is used exactly the same way as "jdoc". There's -# no "jdoc_package_old" tag. +# also a "jdoc_package_old" tag. # # # Usage (don't miss the DO NOT section at the bottom): @@ -137,9 +137,10 @@ class JavadocTag < Liquid::Tag @opts = Options.new(opts.last) # ignore first empty string, may be nil - if tag_name == "jdoc_package" + if tag_name == "jdoc_package" || tag_name == "jdoc_package_old" @is_package_ref = true - elsif tag_name == "jdoc_old" + end + if tag_name == "jdoc_old" || tag_name == "jdoc_package_old" @use_previous_api_version = true end @@ -323,3 +324,4 @@ end Liquid::Template.register_tag('jdoc', JavadocTag) Liquid::Template.register_tag('jdoc_package', JavadocTag) Liquid::Template.register_tag('jdoc_old', JavadocTag) +Liquid::Template.register_tag('jdoc_package_old', JavadocTag) diff --git a/docs/_plugins/jdoc_namespace_tag.rb b/docs/_plugins/jdoc_namespace_tag.rb index 6e697fb948..4688e860ce 100644 --- a/docs/_plugins/jdoc_namespace_tag.rb +++ b/docs/_plugins/jdoc_namespace_tag.rb @@ -104,7 +104,9 @@ class JDocNamespaceDeclaration < Liquid::Tag 'javascript', 'jsp', 'julia', 'kotlin', 'lang-test', 'lua', 'matlab', 'objectivec', 'perl', 'php', 'plsql', 'python', 'ruby', 'scala', 'swift', 'test', 'test-schema', 'tsql', 'ui', - 'modelica', 'visualforce', 'velocity', 'xml'].flat_map {|m| [m, "pmd-" + m]} + 'modelica', 'visualforce', 'velocity', 'xml', + 'vm', # pre-pmd7 name for velocity, only useful for jdoc_old or jdoc_package_old + ].flat_map {|m| [m, "pmd-" + m]} def self.make_base_namespaces res = {} diff --git a/docs/pages/release_notes_pmd7.md b/docs/pages/release_notes_pmd7.md index 64901d3ed8..af8ec352b7 100644 --- a/docs/pages/release_notes_pmd7.md +++ b/docs/pages/release_notes_pmd7.md @@ -2525,7 +2525,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr * {% jdoc_old !!java::lang.java.ast.ASTAnyTypeDeclaration#getQualifiedName() %} * {% jdoc_old !!java::lang.java.ast.ASTMethodOrConstructorDeclaration#getQualifiedName() %} * {% jdoc_old !!java::lang.java.ast.ASTLambdaExpression#getQualifiedName() %} - * [`net.sourceforge.pmd.lang.java.qname`](https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/qname/package-summary.html) and its contents + * {% jdoc_package_old !!java::lang.java.qname %} and its contents * {% jdoc_old java::lang.java.ast.MethodLikeNode %} * Its methods will also be removed from its implementations, {% jdoc_old java::lang.java.ast.ASTMethodOrConstructorDeclaration %}, @@ -2569,7 +2569,7 @@ The following usages are now deprecated **in the JSP AST** (with other languages * The class {% jdoc_old jsp::lang.jsp.JspParser %} is deprecated and should not be used directly. Use {% jdoc !!core::lang.LanguageVersionHandler#getParser(ParserOptions) %} instead. -Please look at [`net.sourceforge.pmd.lang.jsp.ast`](https://docs.pmd-code.org/apidocs/pmd-jsp/6.55.0/net/sourceforge/pmd/lang/jsp/ast/package-summary.html) to find out the full list of deprecations. +Please look at {% jdoc_package_old !!jsp::lang.jsp.ast %} to find out the full list of deprecations. **In ASTs (Velocity)** @@ -2589,13 +2589,13 @@ The following usages are now deprecated **in the VM AST** (with other languages * Concrete node classes will **be made final** with 7.0.0. * Setters found in any node class or interface. **Rules should consider the AST immutable**. We will make those setters package private with 7.0.0. -* The package [`net.sourceforge.pmd.lang.vm.directive`](https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/directive/package-summary.html) as well as the classes +* The package {% jdoc_package_old !!vm::lang.vm.directive %} as well as the classes {% jdoc_old velocity::lang.vm.util.DirectiveMapper %} and {% jdoc_old velocity::lang.vm.util.LogUtil %} are deprecated for removal. They were only used internally during parsing. * The class {% jdoc_old velocity::lang.vm.VmParser %} is deprecated and should not be used directly. Use {% jdoc !!core::lang.LanguageVersionHandler#getParser(ParserOptions) %} instead. -Please look at {% jdoc_package velocity::lang.vm.ast %} to find out the full list of deprecations. +Please look at {% jdoc_package_old vm::lang.vm.ast %} to find out the full list of deprecations. **PLSQL AST**