Monday, March 31, 2008

Generating of serialVersionUID in Netbeans 6.0+


some time ago I wrote question about generator of serialVersionUID in netbeans. After that I saw issue in bugzilla describing this problem. I decided to write this plug-in because I can't see any progress on this issue. For now it generates only default serialVersionUID = 1L. I am working on hash method that generates serialVersionUID from fields and methods. You can find plug-in on netbeans plug-in site.

Thanks to geertjan's posts Fixable hint and Java Hint Generator development was really easy.

Note: Third picture shows code generator which works only in netbeans 6.1-dev. You can download plug-in for 6.1-dev from this location.

Fixable editor hint

Generated serialVersionUID

Code generator from context menu works only in netbeans 6.1-dev