You will need to reference the javahelp user's guide. Download the latest version.
You may also want to send questions to http://forums.java.net/jive/forum.jspa?forumID=71&start=0 if you have problems doing stuff with javahelp.
Laurel's notes on the JavaHelp example added to the authoring tool
Where is the example?
- see JavaHelp Example menu item to the authoring Help menu

- or click the Help button in the Information tab of an activity or step.

Features of javahelp found in the example
Note that most of the features could be added automatically by using a javahelp authoring tool, but we need to buy one, so I did the work to create the javahelp files manually.
Search
- Add the search view to the pas author runtime src/main/resources/sample.hs file
- Follow the instructions for adding full-text search (see the JavaHelp User's Guide), using jhindexer
- The files which are created using jhindexer can be found in src/main/resources/JavaHelpSearch/

Table of Contents
- Add the Table of Contents view to the pas author runtime src/main/resources/sample.hs file
- Follow the instructions for adding an index (see the JavaHelp User's Guide)
- The file which is used to create the index is /src/main/resources/sampleIndex.xml

Index
- Add the Index view to the pas author runtime src/main/resources/sample.hs file
- Follow the instructions for adding an index (see the JavaHelp User's Guide)
- The file which is used to create the index is /src/main/resources/sampleIndex.xml

Help pages available when user is not online
- Help is provided via html pages that are included in the pas author runtime code (see src/main/resources/help directory for html files)
Providing users with the ability to augment the help with comments
I'm hoping someone with some experience with JDIC can help me with this problem
- While this is not part of the javahelp system, there are techniques that we can use to provide this
- An example can be found by looking at the help page for the Evidence step
- Click the link Evidence help on the wiki to see the evidence help page from the wiki - you will note that the formatting of this page is horrible
- We should be able to solve this problem by using a native browser instead of the JEditorPane that is currently used as default in javahelp
- I found this reference on how to do it, but haven't tried yet http://weblogs.java.net/blog/brinkley/archive/2004/11/javahelp_v20_02_1.html
An alternative to JDIC?
Laurel said: Another alternative would be to find a wiki that might render pages
better in the current javahelp browser or to make a wiki space in
confluence that doesn't have lots of crazy formatting requirements.
Scott said:
This would be a nice alternative. If we have control over the wiki it
is definitely possible to generate html which renders nicely in the
HTMLEditorkit. Because wiki text is a small subset of html it is
possible to generate html which the htmleditorkit can handle. We are
actually doing this already with the DIY sites here. We are using
textile (a wiki markup language) to generate html which renders nicely
in the HTMLEditorKit. Any open source wiki should customizable to
generate pages like this. Perhaps even confluence can be customized to
do this.
This approach might be better than using a native browser, because it
will be lighter weight and more portable. However, the last time I
checked HTMLEditorKit does not support forms well. So if you wanted to
edit some of that help text you would have to jump out to a regular
browser.
Modifications that were made to the code to achieve this example:
- In Pas Learner Runtime added org.telscenter.pas.beans.IHelp interface. This interface can be implemented for every class/bean which you want to add help to. I'm not sure if this interface should be moved in the class hierarchy. It may make sense for it to go somewhere less "bean specific".
- In Pas Learner Runtime implemented IHelp in org.telscenter.pas.beans.PasStep, org.telscenter.pas.beans.PasActivity, org.telscenter.pas.steps.Evidence. The strings that are returned from getHelpId correspond to target strings found in pas-author-runtime project src/main/resources/map.jhm. Not sure if we should implement the HELP ID'S elsewhere such as in a constants java class. Can't find any tool to allow a single constant to be used both in java classes and in jhm file, so if anyone has suggestions here, thanks!
- In pas-author-runtime src/main/resources - see the JavaHelp User's Guide to learn about these and how to create them.
map.jhm
sample.hs
sampleIndex.xml
sampleTOC.xml
/JavaHelpSearch (files generated by using jhindexer)
/help/*.html (the actual help files) - In pas-author-runtime added javahelp to maven pom.xml
- In pas-author-runtime added org.telscenter.pas.authortool.help.Helper (and HelperTest into unit tests) to allow access to help functionality application wide. Used Helper to add a help menu item which activates the help functionality (created class org.telscenter.pas.authortool.menu.HelpMenuItem and modified org.telscenter.pas.authortool.menu.HelpMenu - added HelpMenuTest into unit tests). Also added help functionality to the information tab for all Activities and Steps (see "help" button in UI) by modifying org.telscenter.pas.authortool.propertyEditors.pas.basicInfo.BasicInfoUI.
Comments (1)
Mar 15, 2007
Scott Cytacki says:
JDIC at least for us has had several problems. It doesn't do popup browser windo...JDIC at least for us has had several problems. It doesn't do popup browser windows well. It doesn't like showing up in any window other than the main application window. These problems vary from platform to platform (windows, osx, linux).
Sam and I are working on replacing it with a javaxpcom browser which we will have a lot more control over. You can see some notes about this here:
http://confluence.concord.org/display/CCTR/Embedding+Mozilla+in+Java+with+XPCOM
I'd recommend not spending time on JDIC. However, if getting a native browser working sooner than later will have large impact, I will try to find some time to work with you on it.