You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/12/19 12:23:59 UTC
[groovy] branch GROOVY_3_0_X updated: GROOVY-9867: docgenerator not
displaying array types correctly
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new 6cad02e GROOVY-9867: docgenerator not displaying array types correctly
6cad02e is described below
commit 6cad02e862e7a0d9efd494ae9994067959f11f80
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Dec 19 22:22:45 2020 +1000
GROOVY-9867: docgenerator not displaying array types correctly
---
.../main/groovy/org/apache/groovy/docgenerator/DocGenerator.groovy | 6 +++---
.../org/apache/groovy/docgenerator/template.overview-frame.html | 2 +-
.../org/apache/groovy/docgenerator/template.package-frame.html | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/subprojects/groovy-docgenerator/src/main/groovy/org/apache/groovy/docgenerator/DocGenerator.groovy b/subprojects/groovy-docgenerator/src/main/groovy/org/apache/groovy/docgenerator/DocGenerator.groovy
index 13b800d..305b6e8 100644
--- a/subprojects/groovy-docgenerator/src/main/groovy/org/apache/groovy/docgenerator/DocGenerator.groovy
+++ b/subprojects/groovy-docgenerator/src/main/groovy/org/apache/groovy/docgenerator/DocGenerator.groovy
@@ -82,7 +82,7 @@ class DocGenerator {
}
def firstParam = method.parameters[0]
- def firstParamType = firstParam.resolvedValue.isEmpty() ? firstParam.type : new Type(firstParam.resolvedValue, 0, firstParam.parentClass)
+ def firstParamType = firstParam.type
docSource.add(firstParamType, method)
}
docSource.populateInheritedMethods()
@@ -286,7 +286,7 @@ class DocGenerator {
void populateInheritedMethods() {
def allTypes = allDocTypes.collectEntries{ [it.fullyQualifiedClassName, it] }
allTypes.each { name, docType ->
- if (name.endsWith('[]') || name.startsWith('primitive-types')) return
+ if (name.startsWith('primitives-and-primitive-arrays')) return
Type next = docType.javaClass.superClass
while (next != null) {
if (allTypes.keySet().contains(next.value)) {
@@ -313,7 +313,7 @@ class DocGenerator {
}
private static class DocPackage {
- static final String PRIMITIVE_TYPE_PSEUDO_PACKAGE = 'primitive-types'
+ static final String PRIMITIVE_TYPE_PSEUDO_PACKAGE = 'primitives-and-primitive-arrays'
String name
SortedSet<DocType> docTypes = new TreeSet<DocType>(SORT_KEY_COMPARATOR)
diff --git a/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.overview-frame.html b/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.overview-frame.html
index 5095433..622f0f6 100644
--- a/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.overview-frame.html
+++ b/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.overview-frame.html
@@ -35,7 +35,7 @@
<div class="indexContainer">
<h2 title="Packages">Packages</h2>
<ul>
- <li><a href="primitive-types/package-frame.html" title="Primitive types" target="packageFrame">Primitive types</a></li>
+ <li><a href="primitives-and-primitive-arrays/package-frame.html" title="Primitive types" target="packageFrame">Primitive types</a></li>
<% packages.grep().each { %>
<li><a href="${it.name.replace('.', '/')}/package-frame.html" title="${it.name}" target="packageFrame">${it.name}</a></li>
<% } %>
diff --git a/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.package-frame.html b/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.package-frame.html
index 92a6b75..dda07a3 100644
--- a/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.package-frame.html
+++ b/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.package-frame.html
@@ -48,7 +48,7 @@
<% if (docPackage.docTypes.any { !it.interface }) { %>
<div class="indexContainer">
- <h2 title="Classes">Classes</h2>
+ <h2 title="Classes">${docPackage.name.startsWith('primitives-and-') ? 'Primitives' : 'Classes'}</h2>
<ul>
<% docPackage.docTypes.findAll { !it.interface }.each { docType -> %>
<li><a href="${docType.simpleClassName}.html" title="class in ${docType.packageName}" target="classFrame">${docType.simpleClassName}</a></li>