TaskList Plugin Users Guide

Ollie Rutherfurd
John Gellene
Dale Anson
Version 2.7

Copyright (C) 2002 John Gellene, 2003-2004 Ollie Rutherfurd, 2009 Dale Anson

Summary

TaskList searches through your files for "to do" items and presents those in a clickable tree format for easy access.

This plugin provides a dockable list of comments extracted from the comments (or all text) in a file being edited in jEdit. The display shows an icon representing the type of comment, the line where the comment appears and the comment text. You can jump to a comment by double-clicking on the corresponding row of the table. The comment text in the buffer can be highlighted as a user option.

By default, TaskList uses the mode of the file to find comments. Some modes do not designate comments, such as 'text' mode and 'hex' mode. These two modes are not parsed for comments. As edit modes are regularly added to jEdit, there may be other modes that do not contain comments, so no tasks will be shown for those modes.

It is possible for TaskList to parse complete files rather than just comments. This may be somewhat slower, but does allow for the possibility of finding tasks in text and hex files. This setting is done per mode, so, for example, TaskList can be set to look for tasks in the comments in C files, look in the entire file for text files, and skip hex files altogether. This makes it possible for TaskList to be used as a sort of document outliner. For example, you could have tasks set up for the <h1>, <h2>, <h3>, <h4>, and <h5> tags in html files, set TaskList to parse the complete file (rather than just comments) in html files, and then TaskList will present a decent outline of your html files.

In general, binary files are not parsed for comments. TaskList uses an extensive list of filename extensions to decide if a file is binary before opening it, which greatly improves performance. However, it is impossible to determine binary files by name alone, so the once the file is opened, it is scanned for binary content. If it is determined that the file is indeed binary, it will not be parsed for tasks. Unfortunately, the mere act of opening a binary file in jEdit can cause jEdit to display messages about encoding errors.

The types of files that are considered binary are configurable in the plugin options.

Default Tags

A number of default comment tags are supplied, each with a distinctive icon:

Name Icon
DEBUG DEBUG_ICON
DONE DONE_ICON
FIXME FIXME_ICON
IDEA IDEA_ICON
NOTE NOTE_ICON
QUESTION QUESTION_ICON
TODO TODO_ICON
XXX XXX_ICON
??? QQQ_ICON

You can change the icons associated with a task type by changing the plugin's settings in the Plugins -> Plugin Options -> TaskList -> Task Types dialog. You can also add your own comment types, using the icons supplied with the plugin or your own custom icons.

Examples

TODO in a Java comment:

// TODO: add some more comments

NOTE in an HTML comment:

<!-- NOTE: there must be at least one space character before ``NOTE``. -->

Operation

Whenever the plugin is activated, it will parse a buffer and display formatted comments when the buffer is first loaded, when it is saved, and when you switch buffers or edit panes within a view window. To jump to the text of a comment in the buffer, double-click on the row containing the comment.

You can change or delete a comment by right-clicking on a row containing a comment. A popup menu will appear with three selections, Change task tag, Delete task, Parse buffer, Parse All, Sort By, and Sort Direction.

You can change the type of comment (for example, from IDEA to TODO, or from TODO to DONE, by selecting the Change task tag option. A child popup menu will appear with the text of available comment tags. Clicking on an item will cause the buffer text to be updated to show the new comment tag. The TaskList display will also be updated.

You can delete a task comment by selecting Delete task from the popup menu. You then have the choice between deleting the comment tag only (so the comment text will remain but will not be parsed as a task comment) and deleting the entire comment. This operation will also refresh the TaskList display.

Any change or deletion to a task comment in a text buffer can be reversed using the editor's Undo feature.

The TaskList display is not refreshed with every change made to a buffer. It is updated when a buffer is loaded or saved, when you switch edit panes or buffers in the view window and when you make changes to a task comment using the plugin context (right-click) menu. As a result, if you have made unsaved changes to a buffer, TaskList may not be able to find or change your comment text. You can reparse a buffer at any time using the Task List -> Parse buffer menu item in the Plugins menu (which you can tie to a keyboard shortcut), or by using the "Refresh" button in the TaskList dockable.

TaskList will also display a list of all tasks in all open files. This tab can be turned off in the plugin options.

Project Viewer Integration

If the ProjectViewer plugin is installed, TaskList can find all tasks in the current project. For large projects, this can take a long time.

You can turn off parsing of all projects by unchecking the box in the TaskList options, General, "Show tasks for all project files".

You can also turn off parsing of a single project in the ProjectViewer properties for the project.

You can also find the tasks in just part of a project by right clicking on a file or directory in Project Viewer and selecting "Find Tasks" from the popup menu. This can be more useful in large projects. A new tab will be opened for each such action. These tabs can be closed individually when they are no longer needed.

File Browser Integration

You can also find tasks using the File System Browser by right clicking on a file or directory and selecting "Find Tasks" from the plugins menu. A new tab will be opened for each such action. These tabs can be closed individually when they are no longer needed.

The TaskList dockable provides a "Filter" menu that lets you show or hide certain types of tasks. The Filter menu also contains a "Toggle All" item, which makes it easier to select specific types.

Settings and Options

There are three option pane windows available for user settings from the Plugins -> Plugin Options -> TaskList dialog.

General

The General options pane allows you to change the appearance of the TaskList table display, including default sorting criteria, and highlighting of commented buffer text.

Most of these should be self-explanatory.

Task Types

The Task Types options pane allows you to add, delete, or edit comment tags corresponding to task types.

The tags for default task types, and any types you may add, are represented by regular expressions for which the TaskList plugin searches once it encounters a comment token on a line of buffer text. The content of the comment token will depend on the jEdit edit mode being applied to the buffer. The regular expression is applied to all text on a given line following the matching comment. Two fields are extracted for display when a match occurs: the name of the tag that will be displayed at the beginning of the Description column of the TaskList table, and the text of the comment that will follow the tag name. These two fields correspond to two defined groups in the tag's regular expression.

The ability to change the comment type and tag from the TaskList table (using its context menu) depends upon the target comment type's regular expression being in the basic form of the default types:

\s+(task-type-name):\s+(comment-text)$

It is expected that the regular expression contains two groups. The first is the task type name, the second is the task comment. Regular expression groups are not technically required, but it is best practice to do so. If there are no groups or only one group defined, then the entire match will be considered to be the task type name.

Here are some examples to help you write your own task types: \s(TODO)[:]?\s+(.+)$
This will match lines like:

Notice that these regular expressions do contain two groups, as is recommended. In this example, the regular expression requires that the task type name be preceded with and followed by whitespace. This helps ensure that the task type name is not found inside another word.

When using the current version, the name of the task type is the tag name used in regular expression.

You can reset the task patterns to those installed with the plugin by using the Task List -> Reset task patterns command.

Modes

The Modes option pane allow you to specify which modes TaskList should extract tasks from comments.

As text and hex don't have comments, they are not enabled by default.

Known bugs and limitations

The name of a task item must currently be identical to the tag text contained in the regular expression defining the task item. These items may be corrected in a future version.

The current version also does not parse task comments spanning more than one line of buffer text. There is also no facility for serializing the contents of the TaskList display. These features may be added in a future version.

Legal notices

The TaskList plugin and its documentation are released under the GNU General Public License (either version 2 or any later version, at the user's option). A copy of the GPL is available in the COPYING.txt file in the jEdit distribution.

The TaskList plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND; see section 11 and 12 of the GPL for details.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no "Invariant Sections", "Front-Cover Texts" or "Back-Cover Texts", each as defined in the license. A copy of the license is included in the file COPYING.DOC.txt included with the jEdit distribution.

Feedback

Bug reports, comments and suggestions regarding TaskList may be entered in the tracking system at https://sourceforge.net/p/jedit/plugin-bugs/.

Version History

Version 2.5

Version 2.5

Version 2.1, January, 2010

Version 2.0, August, 2009

Version 0.4.4, August, 2004

Version 0.4.3, April, 2004

Version 0.4.2, March 13, 2003

Version 0.4.1, February 18, 2003

Version 0.4.0, June 04, 2002

Version 0.3.5, March 17, 2002

Version 0.3.4, March 4, 2002

Version 0.3.3, January 29, 2002

Version 0.3.2, December 13, 2001

Version 0.3.1, December 12, 2001

Version 0.3, December 11, 2001

Version 0.2, December 1, 2001