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

About these ads

3 thoughts on “Serial version UID generator plugin for NetBeans

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s