Form editor   Source editor   Object Browser
Javadoc
  Compiler   Debugging   JDK support

Javadoc support
NetBeans supports the Javadoc standard for Java documentation - both viewing it and generating it.  It gives the student a solid documentation tool when working with code.

Mounting and accessing Javadoc
You may have noticed the Javadoc tab in the Explorer window. This operates much like the Filesystems tab where you mount source files, except here you mount directories containing Javadoc documentation. An empty directory is mounted there by default - this is where the IDE puts Javadoc documentation you generate for your own code (see below for details on generating Javadoc).

You can also mount existing Javadoc documentation here (for example, the JDK documentation, or the Javadoc for the Open APIs for NetBeans). Any documentation you mount here is included when you do a search. For example, if you have the JDK Javadoc mounted and you press CTRL-F1 while the insertion point in the Editor is over the words javax.swing.JButton, the documentation for JButton pops up almost instantly. You can search all mounted documentation by choosing Help | Javadoc Index Search.

Generating Javadoc
Javadoc documentation can be generated from specially formatted comments within source files. If your source code contains these comments, you can generate Javadoc documentation by right-clicking on the class or package in the Explorer and choosing Tools | Generate Javadoc from the context menu. The documentation will be generated in the default directory mounted in the Javadoc tab of the Explorer.

Entering Javadoc comments in source files - the Auto Comment tool
You can easily add Javadoc comments to your own source files using a tool within the IDE. Right-click your class file and choose Tools | Auto Comment. A dialog pops up and allows you to run through all the members of your class and enter comments, which are added to the source file. It even verifies that there are no parameters you have not accounted for, so you can be sure that your comments are complete.

If a member is marked by an X, or you want to edit the comment for that item, click either the Edit Comment or the Auto Correct button to open the comment editor for that item. Auto Correct will fill in fields in the comment to define variables passed to a method, so that the comment completely documents the method signature.


 

  Form editor   Source editor   Object Browser
Javadoc
  Compiler   Debugging   JDK support

Project Features

Project Links

About this Project

edu was started in November 2009, is owned by Antonin Nebuzelsky, and has 69 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close