Standard comment block
/*------------------------------------------------------------------------------
Purpose:
Notes:
@param parameter1 Description
@return
------------------------------------------------------------------------------*/
The comment parser checks every line to see if it starts with /*-
or ---
and removes it. Therefore, you should never use those characters at the beginning of a line you want to output.
When you provide documentation for a parameter in the comment block, you should use the following format:
@param parameter1 Description
All parameter comments have a special HTML output. If you don't use @param
, the comment parser cannot recognize the parameter descriptions.
Make sure to separate the parts of the parameter description with whitespace, as that's how the documentation parser separates the strings.
If you wish to provide documentation for the return value of a method (not VOID), you can use the @return
tag to provide a return description.
There is no parameter name for the return value, so you just add a description to the marker, separated by a whitespace.
Deprecated annotation
Classes, interfaces, methods and properties can use the @Deprecated
annotation to flag the object as deprecated. These annotations are read and rendered in the VSCode extension as well as in CABL (OpenEdge plugin for SonarQube).
The following attributes can be defined in the annotation:
-
since
: version number since deprecation of the object -
message
: additional information