This tutorial lets you create a module which installs a single menu item to the IDE's main menu bar.

  1. Create a module JAR and prepare a package for it as described above.
  2. Create an Actions API | Callable Action and place it in your module package.
  3. Edit the generated bundle file to customize the display name of the action.
  4. Modify the method performAction in the action source to take whatever action you like. For example, try writing:
    protected void performAction () {
        org.openide.TopManager.getDefault ().
            setStatusText ("Test me!");
    }
    
  5. Compile the action.
  6. Create a Modules API | XML Layer (Empty) in your module's package.
  7. In the Explorer, browse underneath the layer's Root Folder. Create a package named Menu. Create a package underneath that called Tools (for example).
  8. Copy the action. On the folder Tools, Paste | Default Instance. Choose any name, it does not matter.
  9. Right-click your action inside the layer and select (for example) Install... | between (separator) and Setup Wizard.
  10. Save the layer.
  11. Browse underneath the module and find the Layer category. Copy the layer and Paste it under Layer.
  12. Save the module JAR, compile, and execute it.
  13. Check the Tools menu. There should be your item just before Setup Wizard. Select it; the status bar will say Test me!.

Optional steps: