How do I add Java Help to my BEAM module?
- Create a package doc.help in the src/main/resources directory of your BEAM module. In the new package create the files (-) and directories ({+}) listed below. File templates are attached to this page.
doc.help + myHelpSet + images - Action1.html - Action2.html + images - BeamHeader.jpg - myHelpSet.hs - map.jhm - style.css - toc.xml
- In the module.xml of your BEAM module declare help IDs for your actions:
... <action> <id>myAction1</id> <helpID>myID1</helpID> <class>org.esa.beam.myPackage.visat.myAction1</class> ... </action> <action> <id>myAction2</id> <helpID>myID2</helpID> <class>org.esa.beam.myPackage.visat.myAction2</class> ... </action> ...
- Also in the module.xml declare your help set as an extension of the standard BEAM help sets:
... <extension point="beam-ui:helpSets"> <helpSet> <parent>beam-help</parent> <path>doc/help/myProcessorHelpSet.hs</path> </helpSet> </extension> ...
Make sure that the code snippet above is NOT nested in another extension declaration. In this case, the help set declaration would be ignored and not be added to your BEAM module,
but the syntax is valid and you would not get any warning. I.e., the following would be WRONG:... <extension point="beam-ui:actions"> <action> <id>myProcessorAction</id> <class>org.esa.beam.myprocessor.ui.MyProcessorAction</class> <text>My Processor (MERIS)...</text> <shortDescr>This is my Processor</shortDescr> <parent>tools</parent> <helpID>myProcessor</helpID> </action> <extension point="beam-ui:helpSets"> <helpSet> <parent>beam-help</parent> <path>doc/help/myProcessorHelpSet.hs</path> </helpSet> </extension> </extension> ...
Correctly, it should look like this:
... <extension point="beam-ui:actions"> <action> <id>myProcessorAction</id> <class>org.esa.beam.myprocessor.ui.MyProcessorAction</class> <text>My Processor (MERIS)...</text> <shortDescr>This is my Processor</shortDescr> <parent>tools</parent> <helpID>myProcessor</helpID> </action> </extension> <extension point="beam-ui:helpSets"> <helpSet> <parent>beam-help</parent> <path>doc/help/myProcessorHelpSet.hs</path> </helpSet> </extension> ...
- In the pom.xml of your module declare:
... <pluginRepositories> ... <pluginRepository> <id>bc-public</id> <name>Public Maven Repository at Brockmann-Consult</name> <url>http://www.brockmann-consult.de/mvn/os</url> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> ... </pluginRepositories> ... <build> <plugins> <plugin> <groupId>com.bc.maven.plugins</groupId> <artifactId>maven-javahelp-plugin</artifactId> </plugin> </plugins> </build> ...