MagicDraw 18.5 Documentation

Skip to end of metadata
Go to start of metadata

Javadoc is the industry standard for documenting Java classes. Javadoc can be documented inside the documentation field, see figure below.

Documentation Field
Figure 1: Documentation Field.

Report Wizard provides a template tool for translating Javadoc text into Javadoc properties. Javadoc Tool will be loaded and used inside the template upon the user’s request.

An example of Javadoc text is shown below:

/**
 * A base class realizing from interface {@link ITool}.
 * This class provides default implementation for
 * {@link ITool}. The extended class from this class may
 * send message or object to observer class by invoking
 * {@link #notifyObservers(Object)} of class <code>
 * Observable</code>. The observer class such as
 * {@link AbstractTemplateEngine} or graphical user
 * interface can catch notified object and interact with
 * user.
 *
 * @author Siri Chongasamethaworn (siri_c@nomagicasia.com)
 * @since Aug 3, 2007
 */

To print the Javadoc comment and author inside the template:

#import ("javadoc", "com.nomagic.reportwizard.tools.doc.JavaDocTool")
#set ($doc = $javadoc.create($class.documentation))
Comment:
$doc.comment
Author:
$doc.author

The output from this example will be:

Comment:
A base class realizing from interface ITool. This class provides default implementation for ITool. The extended class from this class may send message or object to observer class by invoke #notifyObservers(Object) of class Observable. The observer class such as AbstractTemplateEngine or graphical user interface can catch notified object and interact with user.
Author:
Siri Chongasamethaworn (siri_c@nomagicasia.com)

The Javadoc Syntax Tool is implemented based on Custom Tool (See Appendix A: report extensions).

  • No labels