8

In doxygen, the standard "/// \todo stuff" is used to tag a todo item. I do most of my coding in MSVC so it's handy to be able to see the TODO's in the Task List. MSVC uses "//TODO stuff" for their tags. Is there any way to make them work together? I found the properties pane for the Task list and try to add "\todo" to the list, but it doesn't like the "\" character. Can I make these two work together?

Edit: I am specifically interested to find out how to do this in Visual Studio 10.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
shadowland
  • 757
  • 1
  • 6
  • 20

2 Answers2

9

IIRC doxygen supports javadoc-style structural commands, i.e. you should be able to use @todo and \todo interchangeably, in the eventuality that MSVC will accept @todo as a task marker:

Structural commands (like all other commands) start with a backslash (), or an at-sign (@) if you prefer JavaDoc style, followed by a command name and one or more parameters.

Another option is to use FILE_VERSION_FILTER as a doxygen preprocessor, providing a custom script (or program), e.g. if you have Cygwin installed in C:\cygwin then the following will work nicely:

FILE_VERSION_FILTER = "C:\cygwin\bin\sed -e 's:// *TODO:@todo:g'"
albert
  • 8,285
  • 3
  • 19
  • 32
vladr
  • 65,483
  • 18
  • 129
  • 130
  • Unfortunately, MSVC 2010 says that the only valid characters for a task list token are the alphanumeric characters, _, $, and parentheses. A pre-processing step for doxygen seems to be the only option... – Dima Jun 29 '10 at 19:24
1

I don't know about the way VS treats these "TODO"s. But I think there is an easy way if it also recognizes \TODO as a to do item. In this case you might want to have a look at the doxygen documentation for \xref. This allows you to create tag/commands and link to a special section and a related page. \todo or @todo is defined as

\xrefitem todo "Todo" "Todo List"

What you can do now to create a custom "\TODO" or "@TODO" command is go to your configuration file or the doxywizard and add the line

\xrefitem TODO "Todo" "Todo List" 

to it. Maybe that helps.

albert
  • 8,285
  • 3
  • 19
  • 32
HaMster
  • 533
  • 1
  • 6
  • 17