Create a macro to generate API documentation
Use a BlackBerry® IDE macro to add comments to code.
Once enabled, if you type /** on any line preceding a function declaration, the BlackBerry IDE generates the following comment:
* @param instance <description>.
If you type /** on any other line, the BlackBerry IDE generates the following comment:
The BlackBerry IDE also preloads "<description>" as your search string, searches for the first instance, and selects that instance. This feature enables you to type a description, and then press F3 to move to subsequent parameters.
Because the API documentation macro relies on parsing the browsing information, add javadocs only after you perform a successful build. If your file contains a syntax error above where you are trying to insert comments, the macro does not retrieve the function declaration.
- On the Edit menu, click Preferences.
- On the Editor tab, click Macros.
- In the When I type drop-down list, click /**.
- In the Replace it with textbox, type @javadoc.
- Type /** on the same line or the line immediately preceding each function declaration.
Related topic