Creating an IDE Module

The IDE's modular architecture makes it possible for you to extend the IDE with your own modules. You can use the New Module wizard to create a code outline for a new IDE module, including basic code for working with a new file type and for adding a new menu or toolbar item.

To create a new module:

  1. Choose Tools New Module wizard from the main window to run the wizard.
  2. After completing the wizard, mount the four OpenIDE JAR files (located in the IDE's lib directory) in the Explorer.

    The classes generated by the wizard are dependent on classes in these JAR files, and mounting the JAR files makes them a part of the IDE's classpath.

    1. Choose File Mount Filesystem, and select Add JAR File.
    2. Navigate to your user directory, open the lib directory, select openide.jar, and click OK. When prompted, you can choose to display or hide the JAR in the Explorer.
    3. Repeat the previous two steps to mount the openide-fs.jar, openide-nodes.jar, and openide-utils.jar files.
  3. If you so desire, edit the sources, filling in the specific code you want to include, and compile.
  4. Create a JAR file by choosing File New, expanding the Jar Packager node and selecting Jar Contents. In the wizard, add the generated sources plus any other necessary classes and resources and edit the manifest if necessary. See Creating a JAR File for more information.
  5. Test the module by right-clicking the JAR Contents file in the Explorer and choosing Execute.

    This installs the module in the IDE. If you need to make corrections in the code, you can repeat this step without having to uninstall the module. If you restart the IDE, the module remains installed and you can continue working with it.

If you would like to learn more about the Open APIs, which are used in module creation, visit http://openide.netbeans.org/ to browse or download the documentation.

The New Module wizard's API support is limited. The OpenAPIs Support module provides more thorough support for module authors and includes the API documentation. You can learn more about this module by visiting http://apisupport.netbeans.org/. Or you can install the module through the Update Center.

To install the OpenAPIs Support module:

  1. Choose Tools Update Center from the main window.
  2. In the first panel of the wizard, select the NetBeans Update Center and click Next.
  3. In the next panel, select the OpenAPIs Support (under the Extensions folder) and click Next.

    You will then be prompted with the license. Once you click Accept, the module will start downloading. Then you can verify digital signatures and install the module.

  4. Choose Help Help Sets OpenAPIs Support for more assistance (the OpenAPIs Support online help is installed with the module).
See also
Updating the IDE
Enabling or Disabling a Module

Legal Notices