Find TODO tags in Eclipse

JavaEclipseTodo

Java Problem Overview


When I used Eclipse to add unimplemented methods to a Java class to fix an error, methods were auto-generated and include // TODO Auto-generated method stub

Is there an easy way to view all methods which contain this comment? Some sort of menu option?

Java Solutions


Solution 1 - Java

> Is there an easy way to view all methods which contain this comment? Some sort of menu option?

Yes, choose one of the following:

  1. Go to Window → Show View → Tasks (Not TaskList). The new view will show up where the "Console" and "Problems" tabs are by default.

  2. As mentioned elsewhere, you can see them next to the scroll bar as little blue rectangles if you have the source file in question open.

  3. If you just want the // TODO Auto-generated method stub messages (rather than all // TODO messages) you should use the search function (Ctrl-F for ones in this file Search → Java Search → Search string for the ability to specify this workspace, that file, this project, etc.)

Solution 2 - Java

Go TO Window>Show View >Markers

than you will get java task .

java task have all TODOs of your project

Solution 3 - Java

Tasks view, under Window -> Show View -> Tasks

Solution 4 - Java

Sometimes Window → Show View does not show the Tasks. Just go to Window → Show View -> Others and type Tasks in the dialog box.

Solution 5 - Java

In adition to the other answers mentioning the Tasks view:

It is also possible to filter the Tasks that are listed to only show the TODOs that contain the text // TODO Auto-generated method stub.

To achieve this you can click on the Filters... button in the top right of the Tasks View and define custom filters like this:

enter image description here

This way it's a bit easier and faster to find only some of the TODOs in the project in the Tasks View, and you don't have to search for the text in all files using the eclipse search tool (which can take quite some time).

Solution 6 - Java

  1. Push Ctrl+H
  2. Got to File Search tab
  3. Enter "// TODO Auto-generated method stub" in Containing Text field
  4. Enter "*.java" in Filename patterns field
  5. Select proper scope

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKPrince36View Question on Stackoverflow
Solution 1 - JavaAndrew WView Answer on Stackoverflow
Solution 2 - JavaRadha Mohan MaheshwariView Answer on Stackoverflow
Solution 3 - Javam0skit0View Answer on Stackoverflow
Solution 4 - JavavirtualpathumView Answer on Stackoverflow
Solution 5 - JavaTobiasView Answer on Stackoverflow
Solution 6 - JavaBig AliView Answer on Stackoverflow