Eclipse does not show TODO tasks

In my case I was just not aware of the fact that the project has to build correctly in order for the TODOs to show up. After I fixed the build errors there was no problem anymore to see the TODOs.


The problem is Eclipse should rebuild the settings (probably a bug). The way to work around this is to start Windows > Preferences > Java > Compiler > Task Tags, then change any tag, then press apply; you will be asked if you allow settings to rebuild, accept. Then change back the altered tag and rebuild again. You should have immediately shown TODO in the Tasks view.


I investigated my .project file and found the following natures:

<natures>
    <nature>org.eclipse.ajdt.ui.ajnature</nature>
    <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
    <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
    <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>

The first one refers to AspectJ that I use to process some annotations. I realized that the newly installed Eclipse does not contain AspectJ tools by default! After installing AJDT, my TODOs appeared in the Tasks view, thus solving the problem.

Weird thing is, why does not Eclipse complain about having a project with an unknown nature (=one there is no plugin for)? And why did this absence of AJDT cause the regular JDT to fail finding the TODOs?..

Tags:

Java

Eclipse