Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: Loaden on April 21, 2010, 05:25:26 PM

Title: Improve CC's CallTip
Post by: Loaden on April 21, 2010, 05:25:26 PM
1. support preprocessor tip, example: "MessageBox" to "MessageBoxA".
(http://forums.next.codeblocks.org/index.php?action=dlattach;topic=12396.0;attach=4560;image)
(http://forums.next.codeblocks.org/index.php?action=dlattach;topic=12396.0;attach=4562;image)
2. support global namespace. like "::MessageBox"
3. support comment/string/char judge.

Related discussion:
http://forums.next.codeblocks.org/index.php/topic,12387.0.html (http://forums.next.codeblocks.org/index.php/topic,12387.0.html)
http://forums.next.codeblocks.org/index.php/topic,12396.0.html (http://forums.next.codeblocks.org/index.php/topic,12396.0.html)

Depend patch:http://forums.next.codeblocks.org/index.php/topic,12406.0.html (http://forums.next.codeblocks.org/index.php/topic,12406.0.html)

EDIT:When replace target use 'itemText+_T("()")', add calltip support.
if (event.GetEventType() == wxEVT_SCI_AUTOCOMP_SELECTION)
   {
...
           control->ReplaceTarget(itemText+_T("()"));
           pos = control->GetCurrentPos();
           control->GotoPos(pos + itemText.size()+2);
           if ((*it).second != 0)
           {
               pos = control->GetCurrentPos();
               control->GotoPos(pos - 1);
               ShowCallTip();  // HERE!
           }
       }
   }


[attachment deleted by admin]