By Geertjan-Oracle on Mar 22, 2014
I now have the Entity Expander working as I want. Right-click any POJO (i.e., class that extends nothing other than java.lang.Object, either implicitly or explicitly), and then you will see the "Entity Expanders" menu, with two templates registered by default, one for a plain Java Swing JPanel and the other for a Vaadin Form:
When you select either of these two templates, the fields are used from the POJO and inserted into a new class that extends either JPanel or VaadinForm.
However, the interesting menu item above is "Create". When you click that, a new template is created, after you type the template name in a dialog box, and it is opened into the editor so that you can tweak it however you like. And, automatically, the template is available next time you right-click on a POJO:
Above, you can see that I have added two new templates, one named "WicketComponent" and the other "PrimeFacesUI". These are templates that I have created and that are applied to the currently selected POJO (when you click the related menu item above) to create a new class based on the template.
Use the Template Manager (from the Tools menu) to edit any of the templates or to remove them. Removed templates in the Template Manager are automatically removed from the "Entity Expander" menu:
The variables shown yesterday are the only ones available, plus a new one, "fieldsAndModifiers", to get the modifier and type, together with the name, of a field.
Interested in this feature? Try it out in NetBeans IDE 8.0 after downloading it here: