X

Geertjan's Blog

  • April 9, 2008

Plugin for Creating Web Framework Plugins

Geertjan Wielenga
Product Manager
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:

http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=7597

Install it in NetBeans IDE 6.1 Beta:


  1. Create a new module called, for example, FooFrameworkSupport.

  2. Right-click it and choose "Web Framework Provider Support".

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Join the discussion

Comments ( 1 )
  • Paul Szulc Thursday, April 10, 2008

    This is really cool! Who knows, maybe I will use it pretty soon.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.