Geertjan's Blog

  • October 31, 2005

How to Become Helpless in 5 Minutes (Part 1)

Geertjan Wielenga
Product Manager
At the end of the NetBeans Help System Plug-in Tutorial, you end up with your own plug-in's helpset integrated in the IDE's helpset. But what if you don't want that? Especially when the helpset describes a rich client application, rather than a plug-in, there's no need for the IDE's helpset. In fact, you don't just not need the IDE's helpset, but you don't want it. So you need to hide the IDE's helpset (and, since the IDE's helpset consists of 9 sub-helpsets, all of them except your own helpset are not needed/wanted). By appending _hidden to the name of a file, in the same way that you can hide menus and toolbars (see the end of the FeedReader tutorial for details), you can also hide helpsets in the layer.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem

PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN"

<folder name="Services">
<folder name="JavaHelp">
<!--All 9 sub-helpsets will be hidden: -->
<file name="com-sun-enterprise-tools-studio-j2ee-helpset.xml_hidden"/>
<file name="org-netbeans-modules-j2ee-helpset.xml_hidden"/>
<file name="org-netbeans-modules-usersguide-helpset.xml_hidden"/>
<file name="org-netbeans-modules-apisupport-project-helpset.xml_hidden"/>
<file name="org-netbeans-modules-web-monitor-resources-helpset.xml_hidden"/>
<file name="org-netbeans-modules-db-helpset.xml_hidden"/>
<file name="org-netbeans-modules-tomcat5-helpset.xml_hidden"/>
<file name="org-netbeans-modules-dbschema-helpset.xml_hidden"/>
<file name="org-netbeans-modules-versioning-system-cvss-resources-helpset.xml_hidden"/>
<!--Only this one (i.e., my own plug-in's helpset) will be shown: -->
<file name="org-myorg-myhelpsystem-helpset.xml" url="helpset.xml"/>

Clearly, you need to know the name of the helpset in order to hide it. Well, if you use all of the above _hidden entries, you will—in one go—remove all the default IDE sub-helpsets simultaneously.

So, this is "before":

And this is after adding this attribute below the file declaration for my helpset:

<attr name="org-netbeans-modules-usersguide-below-regular.txt
/org-myorg-myhelpsystem-helpset.xml" boolvalue="true"/>

And this is after adding the _hidden flag to all 9 of the IDE's sub-helpsets:

Note, though, that you need one help topic that has a map ID of ide.welcome. This sets the topic that is displayed when the helpset is opened. I will add all this information to the end of the NetBeans Help System Plug-in Tutorial soon.

Join the discussion

Comments ( 1 )
  • guest Tuesday, March 28, 2006
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.