I wanted to know if anyone knows about a good way to update,constructors, equals,hash,to string, etc. generated by eclipse in Java.
Lot’s of time, after I use the auto-generated code-stubs, I add a member variable to the class, and then I need to delete the auto-generated code, and do it all over again.
Is there a way to cause eclipse to add the new variable to the auto-generated code-stubs ?
edit: ok deleting is not essential, however I still have to go and generate each on of them, I’m looking for an automatic solution.
Take a look at http://www.projectlombok.org as an alternative to writing these methods yourself. In particular the @Data annotation seems to fit your need, see http://www.projectlombok.org/features/Data.html.