Tuesday June 19, 2007
Elvis, Einstein, and Advanced NetBeans API Wizards
Just like Elvis and Einstein were 'best of breed', so the enhanced NetBeans API wizards that I've blogged about in the past few days are in a class of their own. 'Best of breed', if you will. So, with that unlikely comparison freshly introduced to your mind, click the link below and you'll find yourself in the NetBeans Plugin Portal page dedicated to the Elvis/Einstein of the NetBeans API wizard world:
http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=2880
Click the giant "Download" button on the above Plugin Portal page, install the NBM file in a very (very) recent 6.0 development build and then you'll find... Elvis and Einstein have infiltrated your New Project wizard:
(For the visually challenged, the two new icons you see above in the Samples category are of Elvis and Einstein.)
When you complete the wizard for both these samples, you'll find that you have the sources for the two new NetBeans API wizards:
Because I set an implementation dependency on the apisupport/project module, which is a sin, but not unforgivable in this case, it was possible to extract the basis of these wizards from the apisupport/project sources, which I then enhanced, as described over the last few days. You can now, since you're a user of the NetBeans APIs (otherwise you'll have lost interest in this topic by this stage of this blog entry) study these sources and learn how NetBeans API wizards are constructed. You'll find, as I did, that these wizards are very easy to create. Also, you can install the modules, with the result that you have two new wizards available for NetBeans module development, as you can see here:
It is important to note that these two new enhanced wizards must be used in combination. The enhanced New Window Component wizard creates, among many other things, a DataObject that should replace the DataObject that you get from the enhanced New File Type wizard. The enhanced New File Type wizard lets you generate an OpenSupport class, which presupposes that you have a TopComponent, which you can get from the enhanced (or standard) New Window Component wizard. Hence, a little bit (a very little bit) of tweaking is needed at the end of using the two wizards. But the result is... as discussed yesterday... that you get a pretty advanced editor infrastructure for your file type. Hurray. Thanks Elvis and Einstein.
Jun 19 2007, 08:11:32 AM PDT Permalink


