Entity Expander for NetBeans IDE 8 (Part 3)

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:



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

Posted by Guy Daniel on March 22, 2014 at 02:47 PM PDT #

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?

Posted by Sildeag on April 01, 2014 at 07:01 PM PDT #

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?

Posted by Geertjan on April 01, 2014 at 10:35 PM PDT #

I want to install java in this phone

Posted by Dejene on November 13, 2015 at 09:55 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« November 2015