Class ToDoTaglet
- All Implemented Interfaces:
- Taglet
With this taglet, it is possible to add a list of open points to the documentation of a module or a package. The parameter of the tag is the (absolute) path to a text file in Markdown format; this path will be combined with the path provided by the system property "org.tquadrat.foundation.todo.base" (if any).
In the file, each open point consists of a sequence of lines that will end with an empty line (a paragraph in Markdown). HTML tags are taken as they are, JavaDoc tags will be not interpreted.
So the module-info.java file for a project may look like
  this:
 /**
  * …
  *
  * @todo /task.list
  */
  module my.module
  {
      requires java.base;
      requires …
      exports …
  }With "org.tquadrat.foundation.todo.base" set to
  "/home/programmer/project/", the file will be searched at
  "/home/programmer/project/task.list".
Given the contents of that file looks like this:
  Cleanup the class comments
  Re-think the parser implementationthe generated Module description will look like this:
| Module my.module… 
 … | 
With Maven or Gradle, the base path can be easily set to the project root.
The file is interpreted as Markdown since version 0.2.0, before it was a plain text file.
- Author:
- Thomas Thrien - thomas.thrien@tquadrat.org
- Version:
- $Id: ToDoTaglet.java 978 2022-01-06 12:47:52Z tquadrat $
- Since:
- 0.0.5
- 
Nested Class SummaryNested classes/interfaces inherited from interface jdk.javadoc.doclet.TagletTaglet.Location
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate FileThe base path for the todo file.private DocletThe doclet.private DocletEnvironmentThe doclet environment.static final StringThe name of the property that holds the base path for the todo list: "org.tquadrat.foundation.todo.base".static final StringThe name of this taglet: "todo".
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal Set<Taglet.Location> final StringgetName()final voidinit(DocletEnvironment docletEnvironment, Doclet doclet) final booleanprivate static final voidprocessFile(File file, StringBuilder buffer) Parses the given file as a Markdown files and adds the result to the providedStringBuilder.final StringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jdk.javadoc.doclet.TagletisBlockTag
- 
Field Details- 
PROPERTY_TODO_BASEThe name of the property that holds the base path for the todo list: "org.tquadrat.foundation.todo.base". It will be set on thejavadoccommand line like this: "-J-Dorg.tquadrat.foundation.todo.base=…"- See Also:
 
- 
TAGLET_NAMEThe name of this taglet: "todo".- See Also:
 
- 
m_BasePathThe base path for the todo file.
- 
m_DocletThe doclet.
- 
m_DocletEnvironmentThe doclet environment.
 
- 
- 
Constructor Details- 
ToDoTagletpublic ToDoTaglet()Creates a newToDoTagletinstance.
 
- 
- 
Method Details- 
getAllowedLocations- Specified by:
- getAllowedLocationsin interface- Taglet
 
- 
getName
- 
init
- 
isInlineTag- Specified by:
- isInlineTagin interface- Taglet
 
- 
processFileParses the given file as a Markdown files and adds the result to the provided StringBuilder.- Parameters:
- file- The file with the todo list.
- buffer- The destination for the output.
 
- 
toString
 
- 
