CodeBlocksEvent evt(cbEVT_COMPLETE_CODE);
Manager::Get()->GetPluginManager()->NotifyPlugins(evt);
So this works, but it is a little confusing for me to say "NotifyPlugins" when I actually mean "Notify CC Manager (to notify me)"
I would recommend:
CodeBlocksEvent evt(cbEVT_COMPLETE_CODE);
Manager::Get()->ProcessEvent(evt);
So it turns out that the old default STC behavior of appending a ? and a number e.g. "print?1" also works.
If that works, then the revision you are compiling against is out of date. Also, it is unnecessary now; instead assign the number to the (new)
category member of CCToken.
btw, is it expected that a plugin will need to register its own images:
Currently you will have to. I am still thinking about if there is a good way to allow plugins to register (or even share) images through CCManager.
1. what do I put in hlStart, hlEnd and argsPos?
hlStart and hlEnd are: if you appended all of the strings that GetCallTips() returns, what would be the starting and ending indicies of the desired highlighted range.
2. The active calltip is getting automatically hidden after less than second. Any idea why this might be happening?
You must put a location in argsPos which represents the starting position (in the stc) of the arguments, for example the argsPos for when the cursor is anywhere inside GetCallTips() - but not inside GetStyleAt() - would be:
const wxStringVec& tips = ccPlugin->GetCallTips(pos, stc->GetStyleAt(pos), ed, hlStart, hlEnd, argsPos);
^
It is being cancelled immediately because CCManager uses the argsPos variable to determine what calltips are the same, or in the case of wxSCI_INVALID_POSITION (-1) , invalid.
If you want to test the code is in svn here: http://developer.berlios.de/svn/?group_id=7745
PythonCodeComletion-cc contains the code that's compatible with your branch. I've hard-coded the links in the unix project file. I haven't tested on windows at all, so the windows project file may compile without tweaks, but no guarantee.
My apologies, but it will not compile just yet, it seems I have already broken API with you. I will try to post some patches for yours, when I have time.
Oh my god, a documentation calltip like what I always wanted to have ! \o/ Good job
Yes. Big props to the good work by p2rkw and alpha!
My branch has mostly just migrated the code
p2rkw wrote. (Display logic in my branch is slightly different, and *hopefully* acts a little more stable.)