X

Geertjan's Blog

  • March 22, 2014

Entity Expander for NetBeans IDE 8 (Part 3)

Geertjan Wielenga
Product Manager

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:

http://plugins.netbeans.org/plugin/53874

Join the discussion

Comments ( 5 )
  • Guy Daniel Saturday, March 22, 2014

    This is good! Would you be able to make the source available?


  • G Sunday, March 23, 2014
  • Sildeag Wednesday, April 2, 2014

    I have seen this third blog entry. Very interesting! I have Netbeans 8.0 Beta. I could not install the plugin and would like further instructions. The error indicates Nodes API and Utilities API version less than 7.3.8 out-of-date. What do I need to do to correct this and retain Netbeans 8.0 IDE?


  • Geertjan Wednesday, April 2, 2014

    Ask yourself why are you using NetBeans 8.0 Beta? The final release of NetBeans 8.0 has already been released, so why are you using the Beta release?


  • Dejene Friday, November 13, 2015

    I want to install java in this phone


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