How to search through TODO comment list in IntelliJ IDEA?

nadavgam picture nadavgam · Jul 31, 2016 · Viewed 7.5k times · Source

I'm working on a huge project that has thousands of TODO items. So when I go to the TODO tool window in IntelliJ IDEA it shows all of them. How can I search for a specific one?

Answer

Hrabosch picture Hrabosch · Jul 31, 2016

If you want to define which TODOs should be found, you are able to set filter and patterns.

In TODO panel click on Filter TODO Items and select Edit Filters

Intellij IDEA TODO Filter edit

Here you are able to set filters and patterns which should be used. More about that is on their site https://www.jetbrains.com/help/idea/2016.2/defining-todo-patterns-and-filters.html. Keep in mind that after you define a new filter, Intellij will start with Indexing (long proccess for huge projects:( )

Also Intellij IDEA TODO tool lets you select from which part you want to see a TODOs (top bar on uploaded image) or you can simply show all TODOs and start typing (classic searching).