Generating Documentation

Home Up Search Java 2 API C++ Resources

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

  1. 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:
    1. Classes  (tab in Properties dialog)
    2. Variables/Properties  (tab below variables list)
    3. Methods (tab below methods list)
      1. Input parameters (field next to list, but see note below).
      2. 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.
  2. Create a directory to hold the documentation web site. 
  3. Under "Tools" from the main menu, click on "Generate Documentation".
    1. The "Output directory" should be set to be the documentation directory you just created.
    2. For class homework, choose an "Access type" that is "private".     Otherwise, select the level of detail appropriate for your needs.
    3. Click on "Generate" and SB will generate a number of files and subdirectories in the documentation directory.
    4. "index.html" is the home page of the documentation web site.