Author Topic: Function/Class Comments and Intellisense  (Read 6106 times)

Offline GravityWell

  • Multiple posting newcomer
  • *
  • Posts: 18
Function/Class Comments and Intellisense
« on: October 27, 2012, 05:40:14 pm »
I see that Codeblocks has "code completion" which is good for displaying member functions and function parameters.

There is a feature in Visual Studio where functions can have XML comments associated with them, and then intellisense and tooltips will include the comments, like this:


Is there a way to do something similar in Codeblocks?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Function/Class Comments and Intellisense
« Reply #1 on: October 27, 2012, 06:10:28 pm »
Is there a way to do something similar in Codeblocks?
Not at the moment. However, using "switch header source"/"jump to declaration/implementation" in combination with split view / editors besides each other this is kind of implemented. That's at least how I do it and its really convenient.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Function/Class Comments and Intellisense
« Reply #2 on: October 27, 2012, 07:35:19 pm »
or showing the doxygen help, is also a feature sometimes found in editors ...

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Function/Class Comments and Intellisense
« Reply #3 on: October 27, 2012, 07:36:57 pm »
If a feature like this was implemented, I would want it to be compatible with Doxygen syntax, so that "intellisense" and generated documentation always showed exactly the same thing. It should work for undocumented code as well, of course, showing the class, function and variable names. It is often enough.

What bugs me a little about the way such intellisense features work in C::B, is that I often want to call functions that I have just created in another project, and that information hasn't been updated in the help system yet, so I am often left with no help (except looking up the header file manually). Perfectly understandable, but it limits the usability unless you develop against a stable library. Still I would not want C::B to use my computer resources to constantly rescan my code to fix this issue, so I am allright with how things are.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Function/Class Comments and Intellisense
« Reply #4 on: October 29, 2012, 07:49:01 pm »
It can just show the comment above the function declaration/definitions/both.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]