Bug #18205 2011-07-05 06:38

wilk_gardariki

Wrong comment by TODO list plugin

There is a small bug in TODO list plugin.
If you add any kind of item and choose Doxygen C style comment (in block) you will get something like this
          * TODO (Your_profile_name#1#): Your text
while it should be
       /** TODO (Your_profile_name#1#): Your text */.

The reason is an error in switch in file codeblocks/trunk/src/plugins/todo/todolist.cpp.
It's necessary to make a few changes.
    switch(CmtType)
    {
        case tdctCpp:
            buffer << _T("// ");
            break;
        case tdctDoxygenC:
           - buffer << _T(" * ");
           + buffer << _T(" * ");
            break;
        case tdctDoxygenCPP:
            buffer << _T("/// ");
            break;
        case tdctWarning:
            buffer << _T("#warning ");
            break;
        case tdctError:
            buffer << _T("#error ");
            break;
        default:
            buffer << _T("/* ");
            break;
    } // end switch
Futher in the same file
   - if (CmtType != tdctC) 
   + if (!(  (CmtType == tdctC) ||
               (CmtType == tdctDoxygenC) ) )
    {
        // make sure that multi-line notes, don't break the todo
        if (text.Replace(_T("\r\n"), _T("\\\r\n")) == 0)
            text.Replace(_T("\n"), _T("\\\n"));
        // now see if there were already a backslash before newline
        if (text.Replace(_T("\\\\\r\n"), _T("\\\r\n")) == 0)
            text.Replace(_T("\\\\\n"), _T("\\\n"));
    }
And further in this file
    if (CmtType == tdctWarning || CmtType == tdctError)
        buffer << _T("");

    - else if (CmtType == tdctC)
    + else if ( (CmtType == tdctC) ||
                   (CmtType == tdctDoxygenC) )
        buffer << _T(" */");
Category
Application::WrongBehaviour
Group
 
Status
Closed
Close date
2011-08-13 09:14
Assigned to
mortenmacfly
wilk_gardariki 2011-07-05 06:41

Sorry, I've made a mistake while copy/past

case tdctDoxygenC:

- buffer << _T(" * ");

+ buffer << _T(" /** ");

mortenmacfly 2011-08-13 09:14

This bug is now fixed in HEAD.

Thank you for reporting it.