This tutorial shows you how to add a bookmark to some web site to the Help menu.
- Create a module JAR and prepare a package for it as
described above.
- Create a Modules API | XML Layer (Empty) in your module's package.
- In the Explorer, browse underneath the layer's Root Folder.
Create a package named
Menu
. Create a package underneath that
called Help
.
- Right-click on
Help
and select New | Other | Web Bookmark.
Choose a code name for the bookmark such as my-modules-bookmark when prompted
for the new object name. You will also be asked to enter the desired URL.
- Choose an icon (16x16 GIF image) for the bookmark. Create this GIF in your module's package
or copy it from elsewhere.
- Click on the bookmark underneath the layer, and on the Extra tab
of the Property Sheet
select ... on the Custom Icon property. Browse to the icon you chose
and select it. You should see the icon of the bookmark in the Explorer change.
- Create a Other | Properties File resource bundle in your module's
package, named for example Bundle. Close the bundle in the Editor.
- Click on the bookmark underneath the layer, and on the Extra tab
select ... on the Localizing Bundle property. Browse to the bundle
you just created and select it.
- Right-click on the bookmark underneath the layer, and select Populate Bundle....
You should see some messages appear in the Output Window. Reopen the bundle in the Editor.
For the generated key Menu/Help/my-modules-bookmark.url, type in as a value
the name of the menu item you desire, for example My Home Page.
- Save the bundle.
Now you should see the bookmark's name in the Explorer change to the pleasant name.
- Right-click on the bookmark underneath the layer. Select Install...
and in the submenu, pick a location (say between existing bookmarks and a separator).
- Save the layer file.
- Copy the layer file and paste into your module's Layer section in the Explorer.
- Save the module, compile it, and execute it to test your module.
- Check the Help menu. There should be an item with the name and icon you
requested, in the requested position. Click on it; it should open the URL you requested.