Author Topic: Code completion not showing doxygen documentation in source files  (Read 5931 times)


  • Guest
(Post extensively edited for clarity)
Code completion does not show a suggested functions associated doxygen documentation when typing in a source (.cpp) file, but does show it when working in a header (.hpp) file. How can I make it show documentation when in a source file as well? Example:

// main.cpp
#include "a.hpp"

int main()
    return space::Sum(1,2); // Code-completion suggests the namespace and function, but does not show their documentation.
// a.hpp
#pragma once

/// Brief namespace description.
namespace space{

/// Brief function description.
int Sum(int a, int b){
    return a+b;

} // End of namespace space.
// b.hpp
#pragma once

#include "a.hpp"

int F(){
    return space::Sum(2,3); // Code-completion suggests the namespace and function, and shows their documentation.

This does not seem to be affected by changing the settings in 'Settings->Editor->Code completion', specifically ticking/unticking the "Parse documentation" and "Show token's details even if it hasn't documentation" checkboxes under the "Documentation" tab.

This occurs in Code::Blocks svn build rev 9417, SDK Version 1.19.0.
« Last Edit: October 27, 2013, 02:41:57 am by Fuzzy_Wuzzy.bmp »


  • Guest
Re: Making code completion show doxygen documentation
« Reply #1 on: October 26, 2013, 08:05:54 am »
How can I get codeblocks to show the doxygen documentation of a function it suggests?

After checking a checkbox under settings->editor->code completion (probably "Add doxygen comments, when implementing the function method", but my memory is fuzzy), I was able to get code completion to show a neat little box with the doxygen documentation for each function as I scrolled through the little list-thingie with suggestions that it gives. I liked it, and then... it stopped working (it still correctly suggested functions, but didn't show their documentation). I'm not sure if it was because I changed anything, so I pulled the latest nightly source and compiled it (svn build rev 9417), deleted all the settings from my prior installation (in ~/.codeblocks), and installed the new one. I then checked that same box, but I was unable to get it to show documentation with code completion again.

And while I'm here - why isn't said checkbox ticked by default, and what does the 'settings->editor->code completion->documentation tab->parse documentation' checkbox do? Its unticked by default, and since I'm assuming the "add doxygen comments" option doesn't require this one to be ticked, I'm not really sure what it's purpose is. (And no, I can't get the documentation to show regardless of wether "Parse documentation" is ticked or not)

Check it, it will enable the Visual Studio-like balloon that explains what each option does. Also check the other checkbox "Show Token's..." and test again your program. As you type suggestions get documentation right next to each option explaining what it does.