Revision as of 16:50, 30 January 2012 by Jeff rubinoff (Talk | contribs)


Module Helpset Integration FAQs

How to Create a Help Set in a Module

  1. In the IDE, right-click the node of the project to which you want to add the help set and choose New | Other.
  2. In the Module Development category, choose JavaHelp Help Set and complete the wizard.

What Modules are the NetBeans Help Sets In?

Search for Services/JavaHelp/ to find all current help sets.

An easier place to search is the Online Help section of the latest Documentation Table, such as NB71DocumentationTable#OnlineHelp_Updates.

How do I determine the order in which a help set appears in the help viewer?

The order in which help sets are merged is determined by a position attribute in the help set module's layer file. The higher the number, the lower the position. See the list above for the numbers assigned to the current help sets.

To change the position of a help set:

  1. Open the help module's XML layer file, which is in the module's /src directory.
  2. Change the "intvalue" value of the help set's "position" attribute.

How do I hook up CSH for a dialog or UI element?

See this document:

You can debug CSH help IDs by running the IDE with:


The IDE then prints the help ID of each component you press F1 on, or of the Help button in a wizard, in the console/log and tells you if the help ID was not found in the map file.

You can view the output straight from the IDE. Choose View | IDE Log File.

Note: You can add the switch to the NetBeans default switches. Edit INSTALLATION_DIRECTORY/etc/netbeans.conf. If you want to risk editing your .conf file, that is!

How do I link to a page in a separate helpset?

The best way is to use the nbdocs URL protocol, where the "host name" field is the code name base of the other module, and the rest is a resource path (such as from the src/ or javahelp/ directories in the source project). For example:

<a href="nbdocs://org.netbeans.modules.db/org/netbeans/modules/db/docs/connectdb.html">Connecting
to a Database</a>

When you use this format, the IDE displays an error message if the module is not installed. Otherwise broken inter-helpset links do not do anything in the IDE.

The module name should be the name of the module containing the helpset. The name is listed in the OpenIDE-Module property of the module's JAR file (minus any /number). The list above gives the abbreviated code name bases of the help modules in the left column.

How do I merge helpsets?

Helpsets are merged automatically by the IDE's master helpset. You don't need to specify mergetypes for the views of your helpset.

How do I merge into an existing TOC and index category?

In your TOC file, copy the TOC category structure exactly as it exists in the usersguide module TOC file (usersguide/javahelp/org/netbeans/modules/usersguide/ide-toc.xml). Then place your listing in the desired category.

For example, say you wanted to list a help file under the Java Project Basics -> Building Java Applications category. You would enter the following in your TOC file:

<?xml version='1.0' encoding='ISO-8859-1'  ?>
<!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 2.0//EN"
<toc version="2.0">
   <tocitem text="Java Project Basics">
       <tocitem text="Building Java Applications">
           <tocitem text="My Help File" target="my_target"/>

"My Help File" would get merged in at the end of the topics in the category.

The same technique works for indexing. To merge into the "databases" index category, do the following:

<indexitem text="databases" > 
    <indexitem text="MyCoolDB, connecting to" target="connectMyCool"/>

Are there guidelines for creating TOC and Index entries?

  • If possible, try to merge your helpset into the existing TOC categories and index categories. For example, if you are developing a server plugin merge it into the Servers and Databases > Servers category.
  • In general, put all of your topics into a TOC category. There should never be individual topic entries as first-level entries in the TOC.
  • Don't have your category nodes linked to a topic. If there is a general intro topic for your section, put it as an About page underneath. WRONG:
<tocitem text="My Cool Plug-in" target="myCoolPlugin">


<tocitem text="My Cool Plug-in" >
   <tocitem text="About My Cool Plug-in" target="myCoolPlugin"/>

How do I create a glossary item in the help?

Create the glossary page. The page should have an <h6> title in lower case capitalization, for example:

<h6>standard project</h6>
<p>A project that uses an IDE-generated Ant script to compile, run, and debug...

Note Glossary topics shouldn't be listed in the Table of Contents.

Use the following syntax to link to the glossary page:

<object classid="">
    <param name="content" value="../project/csh/glossary_standard.html">
    <param name="viewerActivator" value="">
    <param name="viewerStyle" value="">
    <param name="viewerSize" value="400,220">
    <param name="text" value="standard Java project">
    <param name="textFontSize" value="small">
    <param name="textFontFamily" value="SansSerif">
    <param name="textFontStyle" value="italic">
    <param name="textFontWeight" value="bold">
    <param name="textColor" value="blue">

How do I make a link to an external web page open in the IDE's external web browser?

Use the following syntax:

<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
    <param name="content" value="">
    <param name="text" value="<html></html>">
    <param name="textFontSize" value="medium">
    <param name="textColor" value="blue">

Note When you view the page outside of !NetBeans, this link will not display or will display as a ???

How do I link to the common CSS for the IDE?

Each helpset should use the ide.css that is included in the usersguide module. Linking to the common CSS lets vision-impaired users make changes to the help font and backgroung colors. Use the following link in your HTML pages:

<link rel="StyleSheet"

How do I check links between help files and between metadata and help files?

There are special Ant targets for this purpose that you can run from inside of the IDE.

To check links in individual help sets (including links in and validity of metadata files):

  1. Make sure that you have the nbbuild module checked out. You get this automatically if you have a clone of the repository.
  2. In your help set, right-click the build.xml file for the help set and choose Run Target > check-javahelp. (If you are unsure about which build.xml file applies to the help set, look at the list linked to above to determine the location of the module containing the build.xml file.)

To check inter-helpset links:

  1. Clone the entire NetBeans main repository.
  2. Right-click the 'nbbuild' module's build.xml file and choose Run Target > build-nozip. Now the sources are built. Go get coffee. Do not continue with this procedure unless the build succeeds (see Output window for info).
  3. Now, on the build.xml file again, choose Run Target > check-javahelpbin.

NOTE - This latter check is based on built modules. If you make or update changes in the files, you have to rebuild the modules before the changes will be recognized by the link check. Running the check-javahelp target for the module that you have updated does the trick (you do not necessarily have to rebuild the whole IDE).

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo