Java Reference
In-Depth Information
13.2 Working with ToDo lists
The strategy of leaving comments in source code to help remind the reader of
unfinished work or unresolved problems has been in practice for years. These
comments remain part of the source code, so anyone reading the code has access
to them. If the work you're doing may be handed off to other developers before
you get a chance to finish it, or if you're working in a substantial system of code
that you're not intimately familiar with, consider using IDEA 's ToDo support.
IDEA uses a simple pattern-matching strategy to track ToDo items. The
default settings match against the pattern ToDo . When it encounters this pattern,
IDEA interprets it as an item to be added to your ToDo list. IDEA can detect the
pattern when it's placed within a valid comment. IDEA colors the matched pat-
tern to alert you to its presence. You can control the style and color of the high-
lighting through the editor's color scheme, discussed in chapter 12. A typical
example of a ToDo item is shown in figure 13.3.
IDEA can detect ToDo patterns in all supported file types that have de-
fined comments syntax. Make sure you insert ToDo items inside com-
ments that are valid for the current file type.
NOTE
As you work, IDEA constantly keeps up with any ToDo entries it finds; you don't
have to execute a search to view your list. The list is available at any time through
the TODO tool window, which you can access by clicking its icon or pressing
Alt+6 . A ToDo tool window is shown in figure 13.4.
This tool window displays all of your ToDo entries and their location in your
source tree. The window has two tabs: the default tab, Project , shows your
project's ToDo entries; the second, Current File , limits the list to those found in
the file you're currently editing. You can use the toolbar controls listed in
table 13.1 to organize or explore your ToDo items. The numbers next to each
entry tell you the row and column number of the match.
Figure 13.3
ToDos are special comments that are handled differently within IDEA.
 
 
 
 
 
Search WWH ::




Custom Search