Geertjan's Blog

  • March 10, 2006

How to Become Helpless in 5 Minutes (Part 2)

Geertjan Wielenga
Product Manager
In How to Become Helpless in 5 Minutes (Part 1), I blogged about how you can easily exclude helpsets provided by other people's plug-in modules from your application. I guess this is not something you'd be concerned about if you're using the IDE—but what if you're creating a rich-client application (i.e., a Swing application) on top of the NetBeans Platform? Do you really want to include helpsets that explain how to create, for example, web services in the IDE? I doubt it.

So, in How to Become Helpless in 5 Minutes (Part 1) I showed how you can exclude helpsets that others have provided from your own application. But, recently, I've been told about a better way of doing that, i.e., instead of manually in a plug-in module's layer.xml file. This is what you do—expand the XML Layer file that you find in the plug-in module's Important Files node. And this is what you should then see:

The second node, i.e., the one highlighted above, has hundreds (thousands?) of subnodes, provided by all the plug-in modules that make up the application (in this case, the application is the IDE). If you expand that node, and scroll quite far down, you'll find the Services subnode, which, when you expand it, displays the JavaHelp subnode. Now all you need to do is right-click one or more of the JavaHelp subnode's items, as shown below, and then choose Delete:

And when you do that, the layer.xml file will contain tags that have the text _hidden appended to them, as shown in How to Become Helpless in 5 Minutes (Part 1). As a result, when your plug-in module is installed, the helpsets that you have marked as _hidden are excluded from the complete set of helpsets provided by the application. So, the point is, you don't have to type (or paste) these tags into the layer.xml file yourself—by deleting the relevant node, the IDE will add the tags for you.

To undelete the hidden helpset, just delete the tag, rebuild the plug-in module, and re-install it. (When you deleted the helpset, you didn't actually delete anything, you just allowed the IDE to add tags to the layer.xml file for you.)

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.