Skip to content

Commit

Permalink
Added inherited properties summary to properties section
Browse files Browse the repository at this point in the history
  • Loading branch information
moste00 authored and paulk-asert committed Jan 13, 2024
1 parent dfb3cd7 commit 67a1f6b
Showing 1 changed file with 34 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ <h3>Enum Constants Summary</h3>
<!-- =========== FIELD SUMMARY =========== -->
<%
def buffer = new StringBuilder()
def propBuffer = new StringBuilder()
classes = []
if (classDoc.isInterface()) {
classes.addAll(classDoc.interfaces().toList())
Expand Down Expand Up @@ -341,6 +342,19 @@ <h3>Enum Constants Summary</h3>
<td class="colFirst"><strong><code>${c.typeSourceDescription} ${linkable(c)}</code></strong></td>
<td class="colLast"><code>${list.join(', ')}</code></td>
</tr>
"""
}

list = []
list = c.properties().collect { prop ->
"<a href='${classDoc.relativeRootPath}${c.fullPathName}.html#${prop.name()}'>${prop.name()}</a>"
prop.name()
}
if (list) {
propBuffer << """ <tr class="${i%2==0?'altColor':'rowColor'}">
<td class="colFirst"><strong><code>${c.typeSourceDescription} ${linkable(c)}</code></strong></td>
<td class="colLast"><code>${list.join(', ')}</code></td>
</tr>
"""
}
}
Expand Down Expand Up @@ -390,8 +404,9 @@ <h3>Field Summary</h3>
<% } // if hasFields or buffer %>

<!-- =========== PROPERTY SUMMARY =========== -->
<% if (hasProperties) { %>
<ul class="blockList">
<% if (hasProperties || propBuffer.length()>0) { %>
<ul class="blockList"> <%
if (hasProperties) { %>
<li class="blockList"><a name="property_summary"><!-- --></a>
<h3>Properties Summary</h3>
<ul class="blockList">
Expand All @@ -410,8 +425,24 @@ <h3>Properties Summary</h3>
</table>
</ul>
</li>
<% } // if hasProperties

if (propBuffer.length()>0) { %>
<li class="blockList"><a name="properties_summary"><!-- --></a>
<ul class="blockList">
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited properties summary table">
<caption><span>Inherited properties</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Properties inherited from class</th>
<th class="colLast" scope="col">Properties</th>
</tr>
${propBuffer}
</table>
</ul>
</li>
<% } // if propBuffer %>
</ul>
<% } %>
<% } // if hasProperties or propBuffer %>

<!-- =========== ELEMENT SUMMARY =========== -->
<% if (hasElements) { %>
Expand Down

0 comments on commit 67a1f6b

Please sign in to comment.