Skip to main content

Context-Sensitive help and merged helpsets

No replies
Joined: 2010-02-16


I have a big problem and am hoping that someone out there can help me.


* I have a master helpset with several statically merged

* I only use the TOC view and I want context-sensitive

* My application is an MDI based Swing application.


* To simplify matters for all the developers working on
this project, the helpset is loaded from the main
class and the enableHelpKey method is called on the
rootpane of the JFrame on the master helpset.

* All JInternalFrames that the developers produce, call
CSH.setHelpIdString on their components. This actually
works to some extent. When the F1 key is pressed on
one of the components in an internal frame, the help
window pops up and the correct help text is
displayed. However, the corresponding node in the TOC
is not selected. I went through the source code of
JavaHelp (2.0_01) and realized that the comparison
when deciding what node in the TOC tree to select not
only depends on the help ID string, but also on the
helpset. This seems a bit odd, since JavaHelp
obviously finds the correct target, but seems
to be more picky when it tries to select a node in the

Possible solutions:

* I could of course tell all the developers that they
also have to call CSH.setHelpSet on all their
components and somehow pass their helpset,
but since all helpsets are already loaded and merged,
that seems out of the question.

* We could merge the helpsets manually and just use one
huge helpset, since all ID's are unique anyway, due to
a pre-defined structure. But who wants to do that?

* The solution that seems most appealing right now is to
modify the source code of either the method or the
BasicTOCNavigatorUI.findID method, but is that even

Does anyone have any other suggestions?

What I REALLY would want is for Sun to rewrite the
code so that the developer can switch off the unqiue ID
per helpset policy and enforce unique ID for the entire
collection of helpsets.

Thankful for any comments or suggestions

/Fredric Dahlqvist