Adding Documentation to Your Code
You can insert Doxygen comments in your code to generate API documentation, and have that
documentation displayed in code completion popups when you use the API elsewhere while
editing your code.
To add Doxygen documentation to your code:
-
In a C or C++ source file, place the cursor in the line above the function or method you
want to document.
-
Type /** or ///and press Enter to generate a documentation stub for the function or
method.
-
Edit the stub to provide information about the parameters and return values.
To see the documentation in the code completion pop-up:
-
Navigate to a place where the function or method is called, for example by right-clicking
the function name and selecting Find Usages.
-
In the source file place the cursor on the function call and press Ctrl-Space to see the
code completion pop-up with the Doxygen documentation displayed.
-
You can choose Source > Show Documentation to see the pop-up documentation of the
function or method at the cursor.
-
You can choose Window > IDE Tools > C/C++ Documentation to see documentation of the
function or method at the cursor in a separate window.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.