Code completion javadoc
Authors:
Saumendra Poddar, Patrick Keegan, Martin Roskanin
NetBeans code completion displays pop-up Javadoc documentation for
classes or members as you navigate them. You can browse Javadoc documentation at the
same time you are using the code completion feature or use it as independent
tool.
By default, a Javadoc
box appears above or below the code completion box when you are completing
Java expressions.
It is possible to open the Javadoc box independently from
the code completion also. Just place the cursor on the item for which you want to
get the Javadoc and press Ctrl+Shift+Space.
The following table shows the buttons in the code completion Javadoc box:
| Icon |
Description |
 | Goes to previous page. |
 | Goes to next page. |
 | Shows Javadoc in external web browser.
This command only works if you have compiled the Javadoc documentation mounted
in the Javadoc Manager. |
 | Opens the class's
source in the Source Editor. This command only works if you have the class's
source file mounted in the Explorer. |
To disable automatic appearance of the code completion Javadoc box:
- Choose Tools Options.
- Expand Editing Editor Settings.
- Select the Java Editor node.
- Click the Expert tab.
- Set the Auto Popup Javadoc Window property to False.
You can manually open the code completion Javadoc box by pressing
Ctrl-Shift-Spacebar.
For the Javadoc documentation to display while you are
using Java code completion, you must have the sources (.java files) for the
classes mounted as a filesystem. If you are running version 1.4 of the J2SE
platform, the IDE mounts the SDK sources automatically the first time you
use code completion on a JDK class.
For example, to browse the Javadoc documentation during code completion of a
servlet, the source files for the servlet.jar (which can be downloaded from
http://jakarta.apache.org/site/cvsindex.html) are required to be mounted as
a filesystem.
The "hidden" property for this filesystem can be set to True because it is
unnecessary to be seen as a filesystem under the main Filesystems root. For
web developers, it would also be a good idea to change the level settings of
this filesystem from Project level to User level, so that pop-up Javadoc
documentation during code completion when coding servlets is readily
available to all projects created by the developer. You can change the level
settings of this filesystem in the Options window.
- Expand the levels column by clicking on the "Show Levels (<<)" button.
- Expand System -> Filesystems Settings.
- Then select the filesystem that contains the source files for
servlet.jar.
- Click on the User column against that filesystem, and by doing that you
will see the option "Define here"
- Hit Enter on your keyboard. This will pop up a messagebox mentioning..
"Moving the definition here will remove any values stored in layers left of
the selected column. Do you want to proceed?"
Click the "Yes" option, and this will set the filesystem to User level, and
therefore this filesystem will be available on all projects.
If you have the class's compiled Javadoc mounted in the Javadoc Manager, you can browse the
Javadoc in a web browser by clicking the
button.
You can use Shift+arrows, Page Down, Page Up for scrolling the javadoc window.