First, ignore the Wicket window on the right hand side. That's not what this blog entry is about. Instead, look at the small window at the bottom left of the screenshot. That's right, the one that has the label "Code Snippet Window". All you need to do is right-click some code in the editor (as you see me doing in the screenshot) and then you choose Add Code Snippet. And then this dialog box appears:
You fill in the values and then a new item is added to the Code Snippet Window. Then, when you double-click the item in the Code Snippet Window, it appears at the cursor in the Source Editor.
You can get the plug-in module that provides this feature (along with some other plug-in modules that I haven't looked at yet), by registering Gregor Kovac's brand new update center:
He's still working on the plug-in module. For example, you can't delete or rename or edit code snippets. And they aren't persisted (when you restart the IDE, they're gone). But he's working on it! And, as you can see, the code snippet window is useful already.
Finally, in a future release of the IDE, I imagine that Gregor's idea will be implemented within the Component Palette. You'll be able to select code and then add it as a new item in the Component Palette (not, as in Gregor's plug-in module, within a separate window). In fact, I recently talked to the engineer who works in this area of NetBeans and he told me that he's planning to do exactly that. However, in the meantime, I'm already using Gregor's work. I think it's great.