Let's say you're beginning to create a plugin that will integrate tools for some web framework into NetBeans IDE. Download this plugin to help you get started:
Install it in NetBeans IDE 6.1 Beta:
- Create a new module called, for example, FooFrameworkSupport.
- Right-click it and choose "Web Framework Provider Support".
- In the first panel, choose a library containing the JARs required by your web framework. You can also add those JARs to a new library, after clicking "Manage Libraries". Finally, make sure to check the "Use in New Web Framework" checkbox! Click Next.
- In the second panel, change the suggested library name and display name, if needed. Click Finish and wait a bit for the files to be generated.
- Inspect the generated sources. You get a WebFrameworkProvider class, a WebModuleExtender class, and an empty configuration panel. You also get a library descriptor. All of these are correctly registered in the layer.xml file and the necessary API dependencies are in the project.xml file.
- Install the module right away without making any changes to the code at all. Then create a new web application and notice, in the final panel, i.e., the Frameworks panel, that a new entry is available for your web framework. The configuration panel is empty. Select the checkbox next to the name of the web framework, click Finish, and the library is added to the application's classpath.
Now study the NetBeans sources, such as web.struts, to see how to continue developing the plugin. You probably want to let the user configure something in the Frameworks panel so that some artifacts specific to the framework are generated into the web application source structure when the wizard is completed. The next version of this plugin will add some code that will help you get started with this part.