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:

  1. In a C or C++ source file, place the cursor in the line above the function or method you want to document.
  2. Type /** or ///and press Enter to generate a documentation stub for the function or method.
  3. Edit the stub to provide information about the parameters and return values.

 

To see the documentation in the code completion pop-up:

  1. Navigate to a place where the function or method is called, for example by right-clicking the function name and selecting Find Usages.
  2. 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.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.