MPTASKLIST-9 : Show todos for fields

reviewed by aheritier

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@185092 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier committed 2005-06-06 23:05:46 +00:00
1 parent 559c918ee1
commit c3e6ad8894
3 files changed
+88 -31

No files matched your search

@@ -14,7 +14,8 @@
<tr>
<th>Class</th>
<th>Class Todos Count</th>
<th>Method with Todos</th>
<th>Method Todos Count</th>
<th>Field Todos Count</th>
</tr>
</thead>
<tbody>
@@ -25,10 +26,17 @@
#foreach ($m in $class.methods)
#set ($methodTodoTags = $m.getTags($jellyContext.taskTag))
#if ($methodTodoTags.size() > 0)
#set ($methodTodosCount = $methodTodosCount + 1 )
#set ($methodTodosCount = $methodTodosCount + $methodTodoTags.size())
#end
#end
#if ($classTodosCount > 0 || $methodTodosCount > 0)
#set ($fieldTodosCount = 0)
#foreach ($f in $class.fields)
#set ($fieldTodoTags = $f.getTags($jellyContext.taskTag))
#if ($fieldTodoTags.size() > 0)
#set ($fieldTodosCount = $fieldTodosCount + $fieldTodoTags.size())
#end
#end
#if ($classTodosCount > 0 || $methodTodosCount > 0 || $fieldTodosCount > 0)
#set ($classesCount = $classesCount + 1 )
<tr>
<td>
@@ -36,14 +44,21 @@
</td>
<td>
#if ($classTodosCount > 0)
<a href="#$class.name">$classTodosCount</a>
<a href="#${class.name}.class.todos">$classTodosCount</a>
#else
0
#end
</td>
<td>
#if ($methodTodosCount > 0)
<a href="#${class.name}.methods">$methodTodosCount</a>
<a href="#${class.name}.method.todos">$methodTodosCount</a>
#else
0
#end
</td>
<td>
#if ($fieldTodosCount > 0)
<a href="#${class.name}.field.todos">$fieldTodosCount</a>
#else
0
#end
@@ -53,7 +68,7 @@
#end
#if ($classesCount == 0)
<tr>
<td colspan="3"><em>No class or method todo found</em></td>
<td colspan="4"><em>No class, method or field todo found</em></td>
</tr>
#end
</tbody>
@@ -61,20 +76,27 @@
#foreach ($class in $docInfo.classes)
#set ($todoTags = $class.getTags($jellyContext.taskTag))
#set ($hasToDoMethod = false)
#set ($hasMethodTodos = false)
#foreach ($m in $class.methods)
#set ($methodTodoTags = $m.getTags($jellyContext.taskTag))
#if ($methodTodoTags.size() > 0)
#set ($hasToDoMethod = true)
#set ($hasMethodTodos = true)
#end
#end
#if ($todoTags.size() > 0 || $hasToDoMethod)
#set ($hasFieldTodos = false)
#foreach ($f in $class.fields)
#set ($fieldTodoTags = $f.getTags($jellyContext.taskTag))
#if ($fieldTodoTags.size() > 0)
#set ($hasFieldTodos = true)
#end
#end
#if ($todoTags.size() > 0 || $hasMethodTodos || $hasFieldTodos)
<subsection name="$class.name">
#if ($todoTags.size() > 0)
<table summary="$class.name todos">
<thead>
<tr>
<th>Class Todos</th>
<th><a name="${class.name}.class.todos">Class Todos</a></th>
</tr>
</thead>
<tbody>
@@ -89,26 +111,52 @@
</table>
#end
#foreach ($m in $class.methods)
#set ($methodTodoTags = $m.getTags($jellyContext.taskTag))
#if ($methodTodoTags.size() > 0)
<table summary="${class.name} method todos">
<thead>
<tr>
<th><a name="${class.name}.methods">Method Todos</a></th>
</tr>
</thead>
<tbody>
#foreach ($tag in $methodTodoTags)
<tr>
<td>
<![CDATA[${m.name}(): $tag.value]]>
</td>
</tr>
#if ($hasMethodTodos)
<table summary="${class.name} method todos">
<thead>
<tr>
<th><a name="${class.name}.method.todos">Method Todos</a></th>
</tr>
</thead>
<tbody>
#foreach ($m in $class.methods)
#set ($methodTodoTags = $m.getTags($jellyContext.taskTag))
#if ($methodTodoTags.size() > 0)
#foreach ($tag in $methodTodoTags)
<tr>
<td>
<![CDATA[${m.name}(): $tag.value]]>
</td>
</tr>
#end
#end
</tbody>
</table>
#end
</tbody>
</table>
#end
#if ($hasFieldTodos)
<table summary="${class.name} field todos">
<thead>
<tr>
<th><a name="${class.name}.field.todos">Field Todos</a></th>
</tr>
</thead>
<tbody>
#foreach ($f in $class.fields)
#set ($fieldTodoTags = $f.getTags($jellyContext.taskTag))
#if ($fieldTodoTags.size() > 0)
#foreach ($tag in $fieldTodoTags)
<tr>
<td>
<![CDATA[${f.name}: $tag.value]]>
</td>
</tr>
#end
#end
#end
</tbody>
</table>
#end
</subsection>
#end