Wednesday, September 10, 2008

Commonclipse Eclipse plug-in

http://commonclipse.sourceforge.net/

Commonclipse is an eclipse plugin for jakarta commons-lang users. It features automatic generation of the following methods using commons-lang builders:
  • toString() 
  • hashcode() 
  • equals(Object) 
  • compareTo(Object)

Commonclipse supports customization of generated methods (custom ToStringStyle, use of appendSuper(), excluded fields) through user defined properties. Commonclipse actions are available both in java editor views and in package explorer. See screenshots.

Generated code use jakarta commons-lang 2.0 builders. Commonclipse will not check for the presence of commons-lang in your project classpath, you will need to get a copy from jakarta and to set up java build path appropriately.


Note

When generating hash/equals for classes extending directly Object class you will have to manually remove the appendSupper(super.hashCode) / super.equals() for a correct hash / equals result. See SF.net bug # 1201161.

No comments :

Post a Comment