Tutorial: TODO Example
Consider the following example: creating and viewing TODO items for each of the team members.
Creating patterns for TODO items
On the TODO page of the Settings dialog, click in the Patterns section, and create additional TODO patterns, for example,
todo-John
, todo-Bob
and todo-me
, with new icons, and custom color schemes:
![TODO settings TODO settings](https://resources.jetbrains.com/help/img/idea/2024.2/cl_todo_settings.png)
Creating filters
Next, create several filters, which you will use to show the TODO items, say, for each of the developers, and not for your good self. For this purpose, in the Filters section, click , and specify the filter names, for example,
For John
, For Bob
, and Not for me
. Associate these filters with the patterns:
![TODO filters TODO filters](https://resources.jetbrains.com/help/img/idea/2024.2/cl_todo_filters.png)
Creating TODO items in source code
Now, in the source code, create TODO items: in the line of code, where you want to add a note, press Ctrl+/, or Ctrl+Shift+/, and type TODO
that matches one of the patterns, followed by some meaningful description:
![TODO comments TODO comments](https://resources.jetbrains.com/help/img/idea/2024.2/cl_todo_comments.png)
Viewing TODO items
Having produced a number of TODO items across the whole project, review them in the TODO tool window: click the TODO button on the tool window bar to show the tool window. By default, all the encountered TODO items are displayed.
Let's now show the TODO items for Bob and John, and hide the other items: click the filter icon on the toolbar of the TODO tool window, and select from the menu:
![TODO view TODO view](https://resources.jetbrains.com/help/img/idea/2024.2/cl_todo_view.png)