Issue
After upgrading to Eclipse Juno and importing an existing Java EE project, the Tasks view does not show TODOs from comments in my .java files. I can manually add new TODO tasks by specifically right-clicking the gutter and selecting Add Task...
from the popup menu, but Eclipse should create TODOs from my comments on its own.
I went through all the preferences related to task tags, they are all default (thus OK), still no tags appear. I tried closing/opening the project, re-building it, I checked Git repo to see that no dot files (.project etc) were modified since everything worked in the older Eclipse.
This question did not help me... how to make Eclipse show my Java TODOs?
Solution
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?..
Answered By - vektor
Answer Checked By - Mary Flores (JavaFixing Volunteer)