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 2005-06-06 23:05:46 +00:00
parent 559c918ee1
commit c3e6ad8894
3 changed files with 88 additions and 31 deletions

View File

@ -80,6 +80,15 @@
<role>Release Manager</role> <role>Release Manager</role>
</roles> </roles>
</developer> </developer>
<developer>
<name>Arnaud Heritier</name>
<id>aheritier</id>
<email>aheritier@apache.org</email>
<organization/>
<roles>
<role>Developer</role>
</roles>
</developer>
</developers> </developers>
<versions> <versions>
<version> <version>

View File

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

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
/* /*
* Copyright 2001-2004 The Apache Software Foundation. * Copyright 2001-2004 The Apache Software Foundation.
@ -17,15 +16,16 @@
* limitations under the License. * limitations under the License.
*/ */
--> -->
<document> <document>
<properties> <properties>
<title>Changes</title> <title>Changes</title>
<author email="dion@multitask.com.au">dIon Gillard</author> <author email="dion@multitask.com.au">dIon Gillard</author>
<author email="evenisse@ifrance.com">Emmanuel Venisse</author> <author email="evenisse@ifrance.com">Emmanuel Venisse</author>
<author email="aheritier@apache.org">Arnaud Heritier</author>
</properties> </properties>
<body> <body>
<release version="2.4-SNAPSHOT" date="in CVS"> <release version="2.4-SNAPSHOT" date="in CVS">
<action dev="aheritier" type="add" issue="MPTASKLIST-9" due-to="Dennis Lundberg">Show todos for fields</action>
<action dev="brett" type="fix" issue="MPTASKLIST-8" due-to="Martin van den Bemt">Fix xdoc title</action> <action dev="brett" type="fix" issue="MPTASKLIST-8" due-to="Martin van den Bemt">Fix xdoc title</action>
</release> </release>
<release version="2.3" date="2004-03-10"> <release version="2.3" date="2004-03-10">
@ -38,7 +38,7 @@
<release version="2.1" date="Unknown"> <release version="2.1" date="Unknown">
<action dev="dion" type="add" due-to="Juergen Heidak">Added tasklist summary</action> <action dev="dion" type="add" due-to="Juergen Heidak">Added tasklist summary</action>
</release> </release>
<release version="2.0" date="Unknown"></release> <release version="2.0" date="Unknown"/>
<release version="1.1" date="Unknown"> <release version="1.1" date="Unknown">
<action dev="dion" type="add" due-to="Barry Kaplan">Made the task tag name a property</action> <action dev="dion" type="add" due-to="Barry Kaplan">Made the task tag name a property</action>
<action dev="dion" type="add">Added more documentation</action> <action dev="dion" type="add">Added more documentation</action>