Author Topic: Doxygen doc tooltip  (Read 8640 times)

Mikachu

  • Guest
Doxygen doc tooltip
« on: May 17, 2010, 11:58:38 pm »
Hello,

I'm trying to implement a Documentation Tooltip inside the CC plugin.
The goal is to display the Doxygen associated with a class/function/variable when your mouse is over it.
I find this feature very useful in Eclipse for java, especially when working with external APIs...

Right now, I have a proof of concept working (some refinements needed, of course), but before finishing it and issuing a patch, I'd like to know a few things :

* Is someone already working on such a feature? (Or is it hidden in C::B and I missed it?)
* I need a GUI component to show the doc. Reading the code, I see that displaying call tip uses a scintilla function. So, should I add necessary code to scintilla or just create the component directly in CC plugin?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Doxygen doc tooltip
« Reply #1 on: May 18, 2010, 01:45:11 am »
@MikaChu
I'm so grad to hear this. We have discussed this function some months ago, but there's not such function in the current CC. Also, I didn't heard someone was implementing that feature.

Quote
* Is someone already working on such a feature? (Or is it hidden in C::B and I missed it?)
No, and this feature is not exist in the CB either.

Quote
* I need a GUI component to show the doc. Reading the code, I see that displaying call tip uses a scintilla function. So, should I add necessary code to scintilla or just create the component directly in CC plugin?
Yes, at present, the CC call tip window is just a tip window created by scintilla. We don't own a self-made tip window of CC. We just pass the wxString to the displaying call tip function of scintilla.

I personally suggest you should create a self made windows( or derive some window class from scintilla) to show the docs.

But the  big problems is: How can we collect the "doxygen style comments", for now, all the comments were skipped by the parser in CC plugin. So, one you would like to show the doxygen style comments, you need to either collect the comments when doing parsing, and store them as a property of Token. or you need to parse the code snippet around the call tip Token when you want to show the doxygen comment.

I don't think code into the scitallia is a good idea, because they update quite frequency.  :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.