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 2025/05/03 04:54:46 UTC
(groovy) branch master updated: minor refactor: improve consistent ordering in groovydoc templates
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 71ca3e07d4 minor refactor: improve consistent ordering in groovydoc templates
71ca3e07d4 is described below
commit 71ca3e07d43bbf60e80f2464d6e79ab56d0b581e
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat May 3 12:35:35 2025 +1000
minor refactor: improve consistent ordering in groovydoc templates
---
.../resources/org/apache/groovy/docgenerator/template.class.html | 9 ++++++---
.../groovydoc/gstringTemplates/classLevel/classDocName.html | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.class.html b/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.class.html
index 4b13f720e6..971bcb2746 100644
--- a/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.class.html
+++ b/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/template.class.html
@@ -91,13 +91,16 @@
</tbody>
</table>
</li>
- <% docType.inheritedMethods.each { inhDocType, inhDocMethods -> %>
+ <%
+ docType.inheritedMethods.each { inhDocType, inhDocMethods ->
+ inhDocTypeName = inhDocType.fullyQualifiedClassName.replace('.', '/')
+ %>
<ul class="blockList">
<li class="blockList">
<h4>Methods inherited from ${inhDocType.interface ? 'interface' : 'class'} ${inhDocType.packageName}.${docType.linkAnchor(inhDocType)}</h4>
<p>
- <%= inhDocMethods.findAll { !it.static }.collect { docMethod ->
- """<code><strong><a href="${pathPref}${inhDocType.fullyQualifiedClassName.replace('.', '/')}.html#${docMethod.name}(${docMethod.parametersSignature})">${docMethod.name}</a></strong></code>"""
+ <%= inhDocMethods.findAll { !it.static }.collect { docMethod -> [docMethod.name + "(" + docMethod.parametersSignature + ")", docMethod.name] }.sort{ it[0] }.collect { sig, name ->
+ """<code><strong><a href="${pathPref}${inhDocTypeName}.html#$sig">$name</a></strong></code>"""
}.join(", ") %>
</p>
</li>
diff --git a/subprojects/groovy-groovydoc/src/main/resources/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html b/subprojects/groovy-groovydoc/src/main/resources/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html
index 3656785663..c08f2d1abd 100644
--- a/subprojects/groovy-groovydoc/src/main/resources/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html
+++ b/subprojects/groovy-groovydoc/src/main/resources/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html
@@ -527,7 +527,7 @@ if (classDoc.isInterface() && classDoc.interfaces()) {
buffer << """
<tr class="${i%2==0?'altColor':'rowColor'}">
<td class="colFirst"><code>${c.typeSourceDescription} ${linkable(c)}</code></td>
- <td class="colLast"><code>${list.join(', ')}</code></td>
+ <td class="colLast"><code>${list.sort().join(', ')}</code></td>
</tr>"""
}
}