Customizing TODO filters
Note Contributed by: Esko Luontola
Probably, you already know about IntelliJ IDEA TODO window that finds your â€œTODOâ€ comments and helps you quickly navigate to them. But did you know that you can work not only with TODO comments, but with any custom pattern?
For example, when you create a quick fix for a problem and donâ€™t have the time to create a proper solution, you write a â€œhackâ€ and leave a comment. You can start the comment from â€œHackâ€ and then explain why this code is bad and what should be done to fix it. Of course, it would be useful to find these comments later and navigate to them like you can do with TODO.
To add a new comments pattern, you need to press â€œFilter TODO Itemsâ€ icon in the TODO tool window, and then select Edit Filters.
This will open the TODO dialog, where you can add, delete and modify your patterns. You can also apply filters that will display only certain patterns in the TODO window (to switch between filters, use the same â€œFilter TODO Itemsâ€ icon).
When you add a new pattern, you can also specify the text color (it will appear in both the editor and TODO tool window) and the icon that can be used to show the priority.
After that, you can find your â€œhackâ€ comments in the TODO window.