Author: aheritier
Date: Mon Jun 6 16:05:46 2005
New Revision: 185092
URL: http://svn.apache.org/viewcvs?rev=185092&view=rev
Log:
MPTASKLIST-9 : Show todos for fields
reviewed by aheritier
Modified:
maven/maven-1/plugins/trunk/tasklist/project.xml
maven/maven-1/plugins/trunk/tasklist/src/plugin-resources/templates/tasklist.vm
maven/maven-1/plugins/trunk/tasklist/xdocs/changes.xml
Modified: maven/maven-1/plugins/trunk/tasklist/project.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/tasklist/project.xml?rev=185092&r1=185091&r2=185092&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/tasklist/project.xml (original)
+++ maven/maven-1/plugins/trunk/tasklist/project.xml Mon Jun 6 16:05:46 2005
@@ -80,6 +80,15 @@
<role>Release Manager</role>
</roles>
</developer>
+ <developer>
+ <name>Arnaud Heritier</name>
+ <id>aheritier</id>
+ <email>[EMAIL PROTECTED]</email>
+ <organization/>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
</developers>
<versions>
<version>
Modified:
maven/maven-1/plugins/trunk/tasklist/src/plugin-resources/templates/tasklist.vm
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/tasklist/src/plugin-resources/templates/tasklist.vm?rev=185092&r1=185091&r2=185092&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/tasklist/src/plugin-resources/templates/tasklist.vm
(original)
+++
maven/maven-1/plugins/trunk/tasklist/src/plugin-resources/templates/tasklist.vm
Mon Jun 6 16:05:46 2005
@@ -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
Modified: maven/maven-1/plugins/trunk/tasklist/xdocs/changes.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/tasklist/xdocs/changes.xml?rev=185092&r1=185091&r2=185092&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/tasklist/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/tasklist/xdocs/changes.xml Mon Jun 6 16:05:46
2005
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
@@ -17,15 +16,16 @@
* limitations under the License.
*/
-->
-
<document>
<properties>
<title>Changes</title>
<author email="[EMAIL PROTECTED]">dIon Gillard</author>
<author email="[EMAIL PROTECTED]">Emmanuel Venisse</author>
+ <author email="[EMAIL PROTECTED]">Arnaud Heritier</author>
</properties>
<body>
<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>
</release>
<release version="2.3" date="2004-03-10">
@@ -38,7 +38,7 @@
<release version="2.1" date="Unknown">
<action dev="dion" type="add" due-to="Juergen Heidak">Added tasklist
summary</action>
</release>
- <release version="2.0" date="Unknown"></release>
+ <release version="2.0" 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">Added more documentation</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]