News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Added new comment type for the ToDo plug-in.

Started by Cryogen, March 05, 2010, 09:08:03 PM

Previous topic - Next topic

Cryogen

 Hi Guys,

I have added a new comment type to the ToDo plug-in. This one inserts a doxygen-style "\todo" tag with a C-style comment leader. For example, if you had a doxygen block like this:


/*! \brief Add comment lines for a function's parameters and return type in the selected style.
*
* \param control cbStyledTextCtrl*  The editor's wxStyledTextControl.
* \param iPos int&               The current editor position.
* \param sMidComment     wxString           The comment tag that starts each line in a block.
* \param sTagParam       wxString           The doxygen tag for a parameter description.
* \param sTagReturn      wxString   The doxygen tag for a return value description.
* \param sParams wxString   A string containing the parameters of the function being documented.
* \param sReturn wxString   A string containing the return type of the function being documented.
* \return void
*
*/


None of the existing options would insert an item that's valid for both the plug-in and doxygen. The


\\\ \todo (do something)


type works for the C++-style comment but not for the C-styled one. I have added a new type called "Doxygen C style comment (in block)" which inserts this


*  \todo (do something)


It will produce a new item that is valid in doxygen's C-styled comment block, e.g.


/*! \brief Add comment lines for a function's parameters and return type in the selected style.
*
* \param control cbStyledTextCtrl*  The editor's wxStyledTextControl.
* \param iPos int&               The current editor position.
* \param sMidComment     wxString           The comment tag that starts each line in a block.
* \param sTagParam       wxString           The doxygen tag for a parameter description.
* \param sTagReturn      wxString   The doxygen tag for a return value description.
* \param sParams wxString   A string containing the parameters of the function being documented.
* \param sReturn wxString   A string containing the return type of the function being documented.
* \return void
*
* \todo deal with multiple return type keywords. Works in regex test bed but not in code!
*/


Used in conjunction with the "New line above..." or "New line below..." position options, you can now insert valid doxygen in one hit with the plug-in.

My main motivation for doing this was to make it easier to create "\todo" entries when working with DoxyBlocks (links below).

You can find it on Berlios at: https://developer.berlios.de/patch/?group_id=5358. The patch is attached.

I hope you find it useful, I certainly have.

Cheers,

 Cryo.



[attachment deleted by admin]
DoxyBlocks: Now in contrib. Cool, baby.
DoxyDocs: [url="http://wxsmithaddons.sourceforge.net/docs/doxyblocks/"]http://wxsmithaddons.sourceforge.net/docs/doxyblocks/[/url]
wxSmith Add-ons: [url="http://wxsmithaddons.sourceforge.net/"]http://wxsmithaddons.sourceforge.net/[/url]
Cryo's Patchorama: [url="http://forums.next.codeblocks.org/index.php/topic,12619.0.html"]http://forums.next.codeblocks.org/index.php/topic,12619.0.html[/url]