|
StructureBuilder supplies dialog boxes that will
automatically create Java standard documentation code that appears in the text of
the Java code as special comments. SB can
also create a mini-web site that features a navigation bar, and clickable
UML diagram, and variable & method description frames.
Guideline: When writing documentation for
your UML diagram, focus on what each item is and does, in terms of the
system it is in. Comments like "AState is an
abstract state" are not helpful. Rather, write something
more like "AState represents the abstraction of the NullState and
NonNullState as used by the Context class".
To create documentation all you need to do
is
- Fill out the "Comment" boxes that can be found for every item
in the UML diagram. These boxes appear as tabs or as
small input fields. The places they can be found
include:
- Classes (tab in Properties dialog)
- Variables/Properties (tab below variables list)
- Methods (tab below methods list)
- Input parameters (field next to list, but see note below).
- Return value (in detail window of method comments, see note
below)
NOTE: Due to a bug in
StructureBuilder, filling out the comment fields next to the
input parameters' names does not always work
properly. SB seems to forget the values for these
comments. The better way to document methods is to click
on the little yellow box at the upper left-hand corner of the
comment box for the method itself. This will open up a
"detail" window. Click on the "Synchronize" button
and all the input parameters and the return value will appear in the
window. Fill out the main box for the method itself, and
the small boxes to the right of the input parameters and return
values to document them.
- Create a directory to hold the documentation web site.
- Under "Tools" from the main menu, click on "Generate
Documentation".
- The "Output directory" should be set to be the documentation
directory you just created.
- For class homework, choose an "Access type" that is
"private". Otherwise, select the level of
detail appropriate for your needs.
- Click on "Generate" and SB will generate a number of files and
subdirectories in the documentation directory.
- "index.html" is the home page of the documentation web
site.
|