Extending NetBeans IDE with Plug-in Modules


Once you have decided on the functionality you want to add to NetBeans IDE or assemble as a NetBeans rich-client application, it is useful to do some planning to decide how to best design and implement your plug-in module, along with how to structure your plug-in modules using the plug-in module development support available in NetBeans IDE 5.0.

Many of the best design practices associated with software development are applicable when developing NetBeans plug-in modules, such as the use of software patterns, package naming, etc. In addition, there are other considerations to take into account when creating NetBeans plug-in modules. The following are some of the things you may want to think about when deciding how to structure your plug-in modules.

  • What kind of functionality do you want to add to NetBeans IDE?

    Your plug-in module can be as extensive as your imagination and skills allow. For example, you can create plug-in modules for new functionality by implementing menu items, toolbar buttons, custom components, and editor functionality such as syntax highlighting, code completion, code folding, and multi-view editors.

  • Are there any third-party libraries that you plan to use with the plug-in module?

    If you plan to use third-party libraries with your plug-in module, NetBeans IDE provides a convenient way to incorporate third-party library access and distribution, via a plug-in module project template called "library wrapper module project." In addition, a library wrapper module project also provides the capability to include a third-party license, should it be required for its redistribution with your plug-in module.

  • How should you manage dependencies between multiple plug-in modules?

    NetBeans IDE requires that you do not use circular dependencies in your plug-in modules. A circular dependency is a situation in which a Java class in plug-in module A is dependent on a Java class in plug-in module B, and plug-in module B has a Java class that is dependent on a Java class in plug-in module A. NetBeans IDE will automatically detect circular dependencies, should you attempt to use one or you inadvertently add one. Performing some analysis and design on the structure of your plug-in module(s) will greatly help in avoiding circular dependencies and result in a much easier to maintain plug-in module.

  • Are the behavior and user interface consistent with NetBeans design guidelines?

    If you want the plug-in module to have the NetBeans "look and feel," this is an important aspect to consider.

  • How do you want to distribute your plug-in module?

    If you are building a plug-in module to extend the functionality of NetBeans IDE, you can easily distribute it as a NetBeans Module binary file, which has an .nbm extension and is very similar to a JAR or ZIP file. You can create an NBM file from your plug-in module project with one mouse click. The resulting NBM file contains all the necessary information to integrate and run your plug-in module in an installation of NetBeans IDE.

    Any user interested in using your plug-in module can easily add it to his or her installation of NetBeans IDE by using the Tools | Update Center menu item. In the Update Center wizard, your plug-in module is added by selecting the NBM file from a local file system or from an Update Center you have populated with your NBM file. At some point you will want to choose between whether to distribute your NBM file via an Update Center or by selecting an NBM file from a local file system. This not necessarily a decision that needs to be made prior to beginning development of your plug-in module. However, it is something you should be considering.



NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net