Serial version UID generator plugin for NetBeans

UPDATE (June 2014): the Plugin 49508 presented in this post is no more available at NetBeans plugin portal for unknown (to me) reasons. Moreover the author of another plugin (6887, available from here is reporting unfear cloning of his work; see comments below).

When I moved from Eclipse to NetBeans on my main project, I realized there are some small features which are not in NetBeans. One of them is the possibility to generate the serial version UID.

Standard NetBeans option is to show, for all classes which implements Serializable and do not have a serialVersionUID field, an “Add default serialVersionUID” hint. Generated serialVersionUID (i.e. calculated on class contents) hint is not available.

2013-07-05_img1

The default hint always creates the following field

private static final long serialVersionUID = 1L;

The NB Serial version UID generator plugin adds the feature to have both default and generated serialVersionUID.

2013-07-05_img4

The plugin implements a new “serialVersionUID not defined” hint in the General section. Do not forget to disable the standard NetBeans hint.

2013-07-05_img2

Advertisements