From: Vincent M. <vm...@us...> - 2001-08-20 16:21:12
|
Update of /cvsroot/mockobjects/mockobjects-java In directory usw-pr-cvs1:/tmp/cvs-serv2751 Modified Files: build.xml Log Message: Added a target in build.xml to reformat code (called 'format'). It uses JRefactory Pretty Printer (http://jrefactory.sourceforge.net/cspretty.html). The JRefactory jar need to be put in $ANT_HOME/lib. Be careful, when you execute this target it reformats all the java source code in the <mockobjects>/src directory. So if you want to test it, edit your build.xml and explicitely put the name of the java file on which you would like to test it ! The JRefactory settings are in <mockobjects>/conf/.Refactory/pretty.settings Index: build.xml =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/build.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- build.xml 2001/08/15 14:17:09 1.11 +++ build.xml 2001/08/20 16:21:09 1.12 @@ -602,4 +602,24 @@ </target> + <!-- + ======================================================================== + Formats the source code using JRefactory Pretty Printer. The + JRefactory jar need to be place in ${ANT_HOME}/lib. + ======================================================================== + --> + <target name="format" depends="init" + description="reformats all java code"> + + <taskdef name="pretty" classname="org.acm.seguin.ant.Pretty"/> + + <pretty settingsdir="${conf.dir}"> + <fileset dir="${src.dir}"> + <!-- Be careful, it's going to reformat all code ! --> + <include name="**/*.java"/> + </fileset> + </pretty> + + </target> + </project> |