Question

I was wondering while looking at the eternal "serializable class XXX has no definition of serialVersionUID" warning in Netbeans : why not create a netbeans module which would populate this field "automagically" ?

The idea I had is the following :

  1. Get the full package name
  2. Get the class name
  3. Get the hash of the full path (package name + class name)
  4. Generate the field by some kind of hooking of the warning (make its action with the found value)

Then, I began with some search on how to get a 64bit hash :

But... I'm not experienced enough in NB RCP development to handle this (I did not found how to "capture" the warning event nor its action).

Has someone good tracks on that ?

The module will be publicly and freely released once done.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top