From: Vincent M. <vm...@us...> - 2001-08-20 16:21:12
|
Update of /cvsroot/mockobjects/mockobjects-java/conf/.Refactory In directory usw-pr-cvs1:/tmp/cvs-serv2751/conf/.Refactory Added Files: pretty.settings 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 --- NEW FILE: pretty.settings --- # Pretty.settings version=1.0 # This is the number of spaces to indent for each block. # Twice this number is the amount of space used for # unexpected carrage returns. indent=4 indent.char=space # Style for { and } # C style means that { is at the end of the line # and } is on a line by itself. For example, # if (myTest) { # // This is c style # } # # PASCAL style means both { and } are on lines # by themselves. For example, # if (myTest) # { # // This is PASCAL style # } block.style=C # The following parameter should be changed to true if you # like your parens to have a space before and after them # if ( x == y ) //expr.space=true # if (x == y) //expr.space=false expr.space=false # The following parameter is the minimum number of blank lines # between methods, nested classes, and nested interfaces. # It is also the number of lines before and after # field declarations, though field declarations will have # what ever spacing you used. # # Note that this is a minimum. If your code already # has more space between methods, then it won't shrink # the number of blank lines. lines.between=1 # # Default Javadoc comments # # The following items are used by the mechanism that # automatically inserts javadoc comments. Other than # author (which I recommend that you change), these # values are probably sufficient. However, if you # want to make it easer to search your files to find # where the values are missing, you can change these # to something more unique. # # Author - the default author author=<a href="mailto:vm...@ap...">Vincent Massol</a> # Default description of the class class.descr=Description of the Class # Default description of the interface interface.descr=Description of the Interface # Default description of the constructor {0} stands for the name # of the constructor constructor.descr=Constructor for the {0} object # Default description of the method method.descr=Description of the Method # Default description of the parameter param.descr=Description of Parameter # Default description of the return value return.descr=Description of the Returned Value # Default description of the exception exception.descr=Description of Exception # Pretty.settings version=1.1 # Default description of the getter. {0} is the name of the # attribute, {1} is the name of the class, {2} is 'class' # or 'object' depending on whether it is static or not getter.descr=Gets the {0} attribute of the {1} {2} # Default description of the setter. {0} is the name of the # attribute, {1} is the name of the class, {2} is 'class' # or 'object' depending on whether it is static or not setter.descr=Sets the {0} attribute of the {1} {2} # Parameter description for setters. {0} is the name of the attribute setter.param.descr=The new {0} value # Return description for getters. {0} is the name of the attribute getter.return.descr=The {0} value # # Sort order # # To change the relative priorities of the sort, adjust the number after # the dot. For instance, if you want all the instance parts first then # static parts second, and within these you want the field, constructor etc # to be sorted next, switch the number of sort.1 and sort.2. # Check the type first # This places the fields first, and initializers last. Note that to keep # things compiling initializers must be after the fields. sort.1=Type(Field,Initializer,Constructor,Method,NestedClass,NestedInterface) # Check the class/instance next # To place the static methods and variables first, switch the order # of instance and static. sort.2=Class(Instance,Static) # Check the protection next # To sort with public methods/variables use Protection(public) # To sort with private methods/variables use Protection(private) sort.3=Protection(public) # Group setters and getters last # Setters are methods that start with the word 'set' # Getters are methods that start with the word 'get' or 'is' sort.4=Method(setter,getter,other) # Pretty.settings version=1.2 # Limits the level that javadoc comments are forced # into the document. The following are valid # levels: # * all - all items must have javadoc # * private - same as all # * package - all items except private items must have javadoc # * default - same as package # * protected - protected and public items must have javadoc # * public - only public items must have javadoc # * none - nothing is required to have javadoc # # method.minimum applies to constructors and methods method.minimum=none # field.minimum applies to fields field.minimum=none # Default field description field.descr=Description of the Field # Default description of the run method. {0} is the name of the # attribute, {1} is the name of the class, {2} is 'class' # or 'object' depending on whether it is static or not run.descr=Main processing method for the {1} {2} # Default description of the run method. {0} is the name of the # attribute, {1} is the name of the class, {2} is 'class' # or 'object' depending on whether it is static or not main.descr=The main program for the {1} {2} # Description of the main arguments main.param.descr=The command line arguments # Is the date a required field of the class or interface date.required=false # Pretty.settings version=1.3 # Default description of the add method. {0} is the name of the # attribute, {1} is the name of the class, {2} is 'class' # or 'object' depending on whether it is static or not adder.descr=Adds a feature to the {0} attribute of the {1} {2} # Description of the add argument adder.param.descr=The feature to be added to the {0} attribute # Pretty Printer Version version=1.4 # JUnit has a particular format for the names of methods. # These setup for the unit tests are done in a method named # setUp, the cleanup afterwards is done in tearDown, and # the unit tests all start with the word test. The following # are the default descriptions of these methods. junit.setUp.descr=The JUnit setup method junit.test.descr=A unit test for JUnit junit.tearDown.descr=The teardown method for JUnit junit.suite.descr=A suite of unit tests for JUnit junit.suite.return.descr=The test suite # class.minimum applies to classes and interfaces class.minimum=none # Pretty Printer Version version=1.5 # Is there a space after the cast cast.space=false # Star count for javadoc javadoc.star=2 # Wordwrap length for javadoc. You must have at least # javadoc.wordwrap.min characters in the comment and you # must be passing javadoc.wordwrapp.max for the indenting # plus the comment javadoc.wordwrap.max=78 javadoc.wordwrap.min=40 # Pretty Printer Version version=1.6 # # Header: # Uncomment these lines if you would like # a standard header at the beginning of each file. # You are allowed an unlimited number of lines here, # just number them sequentially. # header.1=/* header.2= * The Apache Software License, Version 1.1 header.3= * header.4= * Copyright (c) 1999 The Apache Software Foundation. All rights header.5= * reserved. header.6= * header.7= * Redistribution and use in source and binary forms, with or without header.8= * modification, are permitted provided that the following conditions header.9= * are met: header.10= * header.11= * 1. Redistributions of source code must retain the above copyright header.12= * notice, this list of conditions and the following disclaimer. header.13= * header.14= * 2. Redistributions in binary form must reproduce the above copyright header.15= * notice, this list of conditions and the following disclaimer in header.16= * the documentation and/or other materials provided with the header.17= * distribution. header.18= * header.19= * 3. The end-user documentation included with the redistribution, if header.20= * any, must include the following acknowlegement: header.21= * "This product includes software developed by the header.22= * Apache Software Foundation (http://www.apache.org/)." header.23= * Alternately, this acknowlegement may appear in the software itself, header.24= * if and wherever such third-party acknowlegements normally appear. header.25= * header.26= * 4. The names "The Jakarta Project", "Ant", and "Apache Software header.27= * Foundation" must not be used to endorse or promote products derived header.28= * from this software without prior written permission. For written header.29= * permission, please contact ap...@ap.... header.30= * header.31= * 5. Products derived from this software may not be called "Apache" header.32= * nor may "Apache" appear in their names without prior written header.33= * permission of the Apache Group. header.34= * header.35= * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED header.36= * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES header.37= * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE header.38= * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR header.39= * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, header.40= * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT header.41= * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF header.42= * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND header.43= * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, header.44= * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT header.45= * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF header.46= * SUCH DAMAGE. header.47= * ==================================================================== header.48= * header.49= * This software consists of voluntary contributions made by many header.50= * individuals on behalf of the Apache Software Foundation. For more header.51= * information on the Apache Software Foundation, please see header.52= * <http://www.apache.org/>. header.53= */ # Pretty Printer Version version=1.7 # The following allow you to require and order # tags for the classes, methods, and fields. To # require the tag, add the name of the tag here # and then add a TAGNAME.descr field. To only # specify the order, just include the tag here. # Here is the order for tags for classes and interfaces class.tags=author # Here is the order for tags for methods and constructors method.tags=param,return,exception,since # Here is the order for tags for fields field.tags=since # In all tags that are required, there are some parameters # that are available. These are: # {0} refers to the current user # {1} refers to the current user # {2} refers to the name of the current object # Now we are ready to specify the author author.descr=<a href="mailto:vm...@ap...">Vincent Massol</a> # Now we are ready to specify the created tag created.descr={1} # Pretty Printer Version version=2.2 # Whether we put a space before the @ space.before.javadoc=true # Should we sort the types and imports? sort.top=false # Should catch statements look like # (true) is: # try { # // Something here # } # catch (IOException ioe) { # // Something here # } # (false) is: # try { # // Something here # } catch (IOException ioe) { # // Something here # } # This value is also used for else statements catch.start.line=false # This determines if there should be a space after keywords # When this value is true, you get: # if (true) { # // Do something # } # When this value is false, you get: # if(true) { # // Do something # } keyword.space=true # # Do you want to lineup the names and descriptions # in javadoc comments? # javadoc.id.lineup=true # # How many spaces should javadoc comments be indented? # javadoc.indent=1 # # What do you do when a newline is unexpectedly encountered? # The valid values are double and param. Double means that # you should indent twice. Param means try to line up the # the parameters. # surprise.return=double # # To handle sun's coding standard, you want the method to begin # with a PASCAL coding style and the {} beneath that to be C style. # This parameter allows you to set the method style different # from the rest. # method.block.style=PASCAL # # Should throws part of a method/constructor declaration always be # on it's own line? # throws.newline=false # Pretty Printer Version version=3.0 # # Wordwrap the javadoc comments # reformat.comments=true # # Single line comment type # # # Should each single line comment be indented a certain number of spaces # from the margin? For this to work right be sure to indent each line with # spaces. # singleline.comment.ownline=true # # Indent the name of the field to this column (-1 for just one space) # field.name.indent=-1 # # Include javadoc comments where ever they appear # keep.all.javadoc=false # # End of line character(s) - either CR, CRNL, or NL # CR means carriage return, NL means newline # end.line=CRNL # # Absolute indent before a single line comment. # singleline.comment.absoluteindent=0 # # Space used before the start of a single line # from the end of the code # singleline.comment.incrementalindent=0 # # This feature describes how the pretty printer should # indent single line comments (//) that share the line # with source code. The two choices are incremental and absolute. # incremental - use an incremental indent # absolute - use the absolute indent level # singleline.comment.indentstyle.shared=incremental # # This feature describes how the pretty printer should # indent single line comments (//) that are on their # own line. The two choices are code and absolute. # code - use the same indent as the current code # absolute - use the absolute indent level # singleline.comment.indentstyle.ownline=code # # This feature describes what type of characters are used for # the java files. # 1 - ASCII (1 byte characters) # 2 - Unicode (2 byte characters - far east) # char.stream.type=1 # # This features sprecifies how to space out a field or a local # variable declaration. # single - a space between the modifiers, the type, the name # and the initializer # dynamic - determine the spacing between the modifiers, type, # name, and initializers so everything lines up # variable.spacing=single # Pretty Printer Version version=3.1 # # When a dynamic field spacing is used, this value specifies # the number of additional spaces to add between the modifiers, # type, name, and initializer. # dynamic.variable.spacing=1 # Pretty Printer Version version=3.2 # # How to format C Style comments. Valid values are: # leave - leave alone # align.star - place a row of stars to the right and align on those # align.blank - just align the comments to the right (no star) # c.style.format=align.star # # For one of the methods above that use the align type, this is # the number of spaces to include after the * or blank # c.style.indent=2 # Pretty Printer Version version=3.3 # # Empty methods and constructors remain on a single line # empty.block.single.line=false # Pretty Printer Version version=3.4 # # Do we force a space after a cast? # cast.force.nospace=false # Pretty Printer Version version=3.5 # # What tag name should be used for exceptions # exception.tag.name=@exception # Pretty Printer Version version=3.6 # # Should inner classes be documented # document.nested.classes=true # # Should the document have a footer. Include it here. # To include more lines, just add more values # #footer.1= #footer.2=// This is the end of the file #footer.3= # Pretty Printer Version version=3.7 # # Should the local variables be aligned with the { and } # or should they be indented to align with the other code? # false means align with the code, true means align # with the { } # variable.align.with.block=false |