tags:

views:

1989

answers:

3

In a eclipse a "//TODO" marks an area in code as a task for later consideration.

Is there a way to add other expressions that will do the same. For example if i want to use "//myprojectname".

+15  A: 

Window > Preferences > Java > Compiler > Task Tags

You can add new tags to your heart's content.


NOTE: Why the Eclipse guys made this a "Compiler" setting is beyond me. It just makes the setting hard for people to find, so it rarely gets customized.

benjismith
They put it under Compiler because the code needs to built before the tasks will show up. Yes, sometimes they do show up when you save, but some can be missed.
Ascalonian
+2  A: 

The answer to your question is detailed here

j pimmel
+3  A: 

The answers by benjismith and j pimmel are perfectly valid and correct. I just want to add that you can find this and other settings by using eclipse's neat preference-dialog feature:

When you open the preferences dialog via "Window/Preferences", type "todo" in the text field in the upper left corner. The options tree will be limited to matching settings.

Voilá

Olaf
Thanks for the tip. I didn't know that!
benjismith