Adding Javadoc tags
The Javadoc generation mechanism allows you to define new Javadoc tags that you would like to use.
About this task
To define a Javadoc tag:
Procedure
-
Create a writable copy of the JavaDocProfile profile by selecting
<Rhapsody installation path>\Share\
(When the product indicates that the profile exists in the model, select the Replace Existing Unit option.) , and then selecting the file
Profiles\JavaDoc\JavaDocProfile.sbs - Create a Javadoc tag in your profile. When you create the tag, select the appropriate item from the Applicable To list.
- Modify the value of the
DescriptionTemplate
property for the relevant type of element. Use$<tagname>
to have the product include the tag text in the Javadoc comment. - Open the Features window for specific elements of the relevant type, and on the Tags tab provide a value for the new Javadoc tag you have added.
Example
Procedure
- Create under your profile a new tag called
codeReviewer
. From theApplicable to
list, select Class. - For the
JAVA_CG::Class::DescriptionTemplate
property, add the following to the property value:[[ * @codeReviewer $codeReviewer]]
- For one or more of the classes in your model, open the Features window,
and on the Tags tab, enter Steve for the value of the tag
codeReviewer
.
Results
When you generate code for your model after these changes, the Javadoc comments
for these classes include @codeReviewer Steve
.