IDE comment keywords

EclipseIdeCommentsRubymineTodo

Eclipse Problem Overview


So I only recently discovered the TODO comment. For those of you that don't know, most modern IDE's will recognize this word in a comment and flag the comment line a different colour so It stands out.

EG.

//Need to talk to Bill about refactoring this code

//TODO:Need to talk to Bill about refactoring this code

You may notice in IDE's like Eclipse or Rubymine highlight the TODO comment and some nice other features to do with it.

My question is: What other keywords are there like the TODO? It seems like a much better way of communicating to developers through comments and a feature that should be a bit more widely known in IDE's. Their purpose is to help with development after all..

Eclipse Solutions


Solution 1 - Eclipse

I can speak of Eclipse, you can customize it.

Click on Window -> Preferences, and search for General -> Editors -> Structured Text Editors -> Task tags, or for Java -> Compiler -> Task tags (there might be some additional ones like for JavaScript, PHP, StatET, etc.)

TODO, FIXME, XXX

I use some additional ones like:

CHECKME, DOCME, TESTME, PENDING

I personally like to use the DISCUSS/REVIEW tags just to make sure I speak about some issue with someone during a code review or pair programming (e.g., I haven't misunderstood the specification how something should work etc.).

You can also set the priorities assigned to the different task tags there too.

Solution 2 - Eclipse

These are known as task tags. In Eclipse they are TODO, FIXME, and XXX.

However, Eclipse allows you to modify the available list of task tags. Go to preferences > Java > Compiler > Task Tags

Here you can modify the available list of task tags, change their priority, and decide if task tags should be case sensitive or not.

Solution 3 - Eclipse

To add custom TODO tags in IntelliJ go to:

Preferences > Editor > TODO

Solution 4 - Eclipse

Patterns like TODO, FIXME are default in NetBeans as ToDo keywords. You can also add any keyword you want in Tools > Options > Miscellaneous > Tasks.

Solution 5 - Eclipse

for enabling/disabling code formatter use: // @formatter:on // @formatter:off

Solution 6 - Eclipse

In Eclipse Oxygen 4.7.2 for C/C++ the task tags are configured in Windows -> Preferences -> C/C++ -> Task Tags.

You can also enable searching for task tags as @rlegendi answer.

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
QuestionOVERTONEView Question on Stackoverflow
Solution 1 - EclipserlegendiView Answer on Stackoverflow
Solution 2 - Eclipsehelloworld922View Answer on Stackoverflow
Solution 3 - EclipseJohn R PerryView Answer on Stackoverflow
Solution 4 - Eclipseuser1242756View Answer on Stackoverflow
Solution 5 - Eclipsenoname nonameView Answer on Stackoverflow
Solution 6 - EclipseRodrigoView Answer on Stackoverflow