Here's another super hidden NetBeans feature. Because of the inherent functioning of this feature, it is completely hidden and undiscoverable from the point of view of the NetBeans user interface.
Now, as you can see, I have the part of the file that I'd like to reuse highlighted.
And then... I drag my mouse into the palette, i.e., the palette that you see on the right of the image above. And then, guess what? This dialog automatically pops up:
The "Content" section above is automatically filled in, based on what I dragged. The other fields and icons are things I fill in myself. Then I click "Add to Palette", at which point the HTML snippet is added into the palette, from where it can then be dragged into an HTML file, like any other snippet in the palette.
Handy, isn't it? And really hidden. (I blogged about this before here in 2008, where you also see a Java file equivalent.)
In other news. There are two excellent new NetBeans blogs out there! The first is NetBeans Ruminations by Hermien Pellissier from South Africa and the other is the NetBeans category of Crazy Java Hacking by Martin Skurla from Slovakia. Check them out! Their blog entries are also going to be visible in the NetBeans welcome screen, because they've been included in the planetnetbeans.org aggregator. You have a NetBeans related blog too? Leave a message here. And if you don't have a NetBeans blog too, why not start one?