Geertjan's Blog

  • September 23, 2007

Multiple Project Template

Geertjan Wielenga
Product Manager
We've been talking with Chet and Romain, about putting some of their Filthy Rich Client samples in the NetBeans Sample catalog, and also in the IDE's New Project wizard. That would make it easy for them to be accessed by NetBeans users, which would be especially useful for those who are reading Filthy Rich Clients. Registering a sample in the New Project wizard is easy, thanks to the Project Template wizard, which is described in quite some detail in NetBeans Project Sample Module Tutorial. However, the problem (to me) with the Project Template wizard is that one can only deal with one sample at a time. So, if I have six samples to register in the New Project wizard, then I need to go through the Project Template wizard six times. That, of course, is a lot better than having no Project Template wizard at all, but it isn't optimal.

So, I've created a new wizard, called "Multiple Project Template". If you go here, you can install it:


Make sure you install it in NetBeans IDE 6.0 Beta 1. It could possibly work in other versions, and development builds, too, but no promises. Especially since I needed to set an implementation dependency on the "NetBeans Module Projects" module (because it currently does not provide an API), there is no guarantee that it will work in anything other than NetBeans IDE 6.0 Beta 1.

Once you have it, create a module project. (Or, use an existing module project.) Then go to the New Project wizard and choose "Multiple Project Template" from the NetBeans Module Development category, as shown here:

Click Next. Now you see the wizard panel below, where you can browse to folders that contain NetBeans projects (any kind of NetBeans project, so long as it is a NetBeans project) and, from those projects, select the ones that you want to register as samples:

Once you're happy with your choices, click Next, choose a category and a package, and the IDE shows you a long list of all the new files that will be created or changed:

Finally, click Finish. The IDE zips up the selected applications and adds all Java classes, files, layer registration entries, and Bundle keys needed, as well as setting all the required project dependencies. The result, for the six samples by Chet and Romain shown above, is as follows:

You can install the module immediately, no post processing of any kind is necessary. For the samples selected above, the result is as follows, i.e., they are added to the Java samples category, supplementing the 4 existing ones:

Next, you can go back to the generated module sources and use the dummy HTML files to add descriptions for your samples. You can also change the icons in the New Project wizard, as described in the tutorial referenced at the start of this blog entry. And that's it. You're done and your samples are good to go. Hurray, that will save me a lot of time when bundling samples from now onwards!

Update. See Enhancements to the Multiple Project Template for enhancements, provided by the 2.0 version of this plugin.

Join the discussion

Comments ( 3 )
  • eduardo pelegri-llopart Sunday, September 23, 2007

    Hi! Quite unrelated but, I think you are not using tags on your entries. If you did, I could use http://blogs.sun.com/main/tags/netbeans to get at them (say via Feedburner, or whatever) into TheAquarium. Ditto for Roumen's entries. - eduard/o

  • Geertjan Monday, September 24, 2007

    Hi Eduardo! All of my blog entries are about NetBeans, so that's why I don't tag them as such.

  • Amin Wednesday, January 21, 2009


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