...
Add the following dependencies in the pom.xml file :
Code Block language xml <dependency> <groupId>org.netbeans.api</groupId> <artifactId>org-netbeans-api-annotations-common</artifactId> <version>RELEASE80</version> </dependency> <dependency> <groupId>org.netbeans.api</groupId> <artifactId>org-netbeans-modules-javahelp</artifactId> <version>RELEASE80</version> </dependency>
Rename the classspath doc.help
If you want to reference one page on a module from an other module you have to use the classpath. This supposes the class-paths are different between modules, which is the correct way to have class-paths in general. By example for the SNAP Graph Builder project, move the help files in the ressources folder form docs.help to org.esa.snap.gpf.ui.docs. With the change of path the indexer "maven-javahelp-plugin" is not working anymore, but NetBeans takes care of this.
Add a « package-info.java » file in the docs source folder, by example for the SNAP Graph Builder project:
Create the org.esa.snap.gpf.ui.docs source package and add the package-info.java file with the following content:Code Block language java @HelpSetRegistration(helpSet = "help.hs", position = 3633) package org.esa.snap.gpf.ui.docs; import org.netbeans.api.javahelp.HelpSetRegistration;
Remarks: org.esa.snap.gpf.ui.docs is the path in the ressource folder where HelpSet file can be found. As convention we want to name the HelpSet file always "help.hs".
Warning The position must be unique
Tips and Tricks
Opening external links
It is possible to open external web help in the default web browser instead of the javahelp window. For this the extenal links need to be change, by example for the BeamDataSources.html page, change
Code Block | ||
---|---|---|
| ||
<a href="https://earth.esa.int/web/guest/pi-community/apply-for-data">https://earth.esa.int/web/guest/pi-community/apply-for-data</a> |
to
Code Block | ||
---|---|---|
| ||
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="https://earth.esa.int/web/guest/pi-community/apply-for-data">
<param name="text" value="<html>apply for data</html>">
</object> |
Info | ||
---|---|---|
| ||
|
Creating link between pages of different modules
It is possible to create link between pages of different modules, for this it is necessary to specify the full path to the module. One common example is the "BeamOverview".
Code Block | ||
---|---|---|
| ||
<a href="../general/BeamOverview.html"> |
should be replaced by
Code Block | ||
---|---|---|
| ||
<a href="nbdocs://org.esa.snap.help/org/esa/snap/help/docs/general/overview/BeamOverview.html"> |
Resources
...