ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/types/mappers GlobMapperTest.java RegexpPatternMapperTest.java
Date Fri, 25 Mar 2005 12:28:59 GMT
peterreilly    2005/03/25 04:28:59

  Modified:    .        WHATSNEW
               docs/manual/CoreTypes mapper.html
               src/etc/testcases/types/mappers globmapper.xml
                        regexpmapper.xml
               src/main/org/apache/tools/ant/util GlobPatternMapper.java
                        RegexpPatternMapper.java
               src/testcases/org/apache/tools/ant/types/mappers
                        GlobMapperTest.java RegexpPatternMapperTest.java
  Log:
  change name of handledirchar to handledirsep to be similar to pathconvet
  
  Revision  Changes    Path
  1.794     +1 -1      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.793
  retrieving revision 1.794
  diff -u -r1.793 -r1.794
  --- WHATSNEW	24 Mar 2005 15:01:30 -0000	1.793
  +++ WHATSNEW	25 Mar 2005 12:28:59 -0000	1.794
  @@ -214,7 +214,7 @@
   * added casesensitive attribute to <globmapper> and <regexpmapper>
     Bugzilla report 16686
   
  -* added handledirchar attribute to <globmapper> and <regexpmapper>
  +* added handledirsep attribute to <globmapper> and <regexpmapper>
     Bugzilla report 32487
   
   * added a new mapper <filtermapper>
  
  
  
  1.25      +4 -4      ant/docs/manual/CoreTypes/mapper.html
  
  Index: mapper.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/CoreTypes/mapper.html,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mapper.html	7 Mar 2005 18:18:27 -0000	1.24
  +++ mapper.html	25 Mar 2005 12:28:59 -0000	1.25
  @@ -70,7 +70,7 @@
   this separator, use <code>${file.separator}</code> instead.
     For the regexpmapper, <code>${file.separator}</code> will not work,
   as on windows it is the '\' character, and this is an escape character
  -for regular expressions, one should use the <code>handledirchar</code> attribute
  +for regular expressions, one should use the <code>handledirsep</code> attribute
   instead.
   </p>
   <h3>Parameters specified as nested elements</h3>
  @@ -264,7 +264,7 @@
         <td align="center" valign="top">No</td>
       </tr>
       <tr>
  -      <td valign="top">handledirchar</td>
  +      <td valign="top">handledirsep</td>
         <td valign="top">
           If this is specified, the mapper will ignore the difference between the normal
           directory separator characters - \ and /.
  @@ -479,7 +479,7 @@
         <td align="center" valign="top">No</td>
       </tr>
       <tr>
  -      <td valign="top">handledirchar</td>
  +      <td valign="top">handledirsep</td>
         <td valign="top">
           If this is specified, the mapper will treat a \ character in a filename
           as a / for the purposes of matching.
  @@ -512,7 +512,7 @@
       &lt;pathconvert property="hd.prop" targetos="windows"&gt;
         &lt;path path="d\e/f\j.java"/&gt;
         &lt;chainedmapper&gt;
  -        &lt;regexpmapper from="${basedir}/d/e/(.*)" to="\1" handledirchar="yes"/&gt;
  +        &lt;regexpmapper from="${basedir}/d/e/(.*)" to="\1" handledirsep="yes"/&gt;
         &lt;/chainedmapper&gt;
       &lt;/pathconvert&gt;
       </pre>
  
  
  
  1.2       +2 -2      ant/src/etc/testcases/types/mappers/globmapper.xml
  
  Index: globmapper.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/types/mappers/globmapper.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- globmapper.xml	17 Dec 2004 13:24:38 -0000	1.1
  +++ globmapper.xml	25 Mar 2005 12:28:59 -0000	1.2
  @@ -1,9 +1,9 @@
   <project>
     <import file="define.mapperresult.xml"/>
   
  -  <target name="handle.dirchar">
  +  <target name="handle.dirsep">
       <mapperresult input="d\e/f/j.java" output="f/j.java">
  -      <globmapper from="d/e\*" to="*" handledirchar="yes"/>
  +      <globmapper from="d/e\*" to="*" handledirsep="yes"/>
       </mapperresult>
     </target>
     
  
  
  
  1.2       +2 -2      ant/src/etc/testcases/types/mappers/regexpmapper.xml
  
  Index: regexpmapper.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/types/mappers/regexpmapper.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- regexpmapper.xml	17 Dec 2004 13:24:38 -0000	1.1
  +++ regexpmapper.xml	25 Mar 2005 12:28:59 -0000	1.2
  @@ -7,9 +7,9 @@
       </mapperresult>
     </target>
   
  -  <target name="handle.dirchar">
  +  <target name="handle.dirsep">
       <mapperresult input="d\e/f\j.java" output="f/j.java">
  -      <regexpmapper from="d/e/(.*)" to="\1" handledirchar="yes"/>
  +      <regexpmapper from="d/e/(.*)" to="\1" handledirsep="yes"/>
       </mapperresult>
     </target>
   </project>
  
  
  
  1.13      +5 -5      ant/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
  
  Index: GlobPatternMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/GlobPatternMapper.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- GlobPatternMapper.java	24 Jan 2005 18:13:20 -0000	1.12
  +++ GlobPatternMapper.java	25 Mar 2005 12:28:59 -0000	1.13
  @@ -62,17 +62,17 @@
        */
       protected String toPostfix = null;
   
  -    private boolean handleDirChar = false;
  +    private boolean handleDirSep = false;
       private boolean caseSensitive = true;
   
       /**
        * Attribute specifing whether to ignore the difference
        * between / and \ (the two common directory characters).
  -     * @param handleDirChar a boolean, default is false.
  +     * @param handleDirSep a boolean, default is false.
        * @since Ant 1.6.3
        */
  -    public void setHandleDirChar(boolean handleDirChar) {
  -        this.handleDirChar = handleDirChar;
  +    public void setHandleDirSep(boolean handleDirSep) {
  +        this.handleDirSep = handleDirSep;
       }
   
       /**
  @@ -156,7 +156,7 @@
           if (!caseSensitive) {
               name = name.toLowerCase();
           }
  -        if (handleDirChar) {
  +        if (handleDirSep) {
               if (name.indexOf('\\') != -1) {
                   name = name.replace('\\', '/');
               }
  
  
  
  1.17      +5 -5      ant/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java
  
  Index: RegexpPatternMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- RegexpPatternMapper.java	24 Jan 2005 15:15:39 -0000	1.16
  +++ RegexpPatternMapper.java	25 Mar 2005 12:28:59 -0000	1.17
  @@ -40,17 +40,17 @@
           reg = (new RegexpMatcherFactory()).newRegexpMatcher();
       }
   
  -    private boolean handleDirChar = false;
  +    private boolean handleDirSep = false;
       private int     regexpOptions = 0;
   
       /**
        * Attribute specifing whether to ignore the difference
        * between / and \ (the two common directory characters).
  -     * @param handleDirChar a boolean, default is false.
  +     * @param handleDirSep a boolean, default is false.
        * @since Ant 1.6.3
        */
  -    public void setHandleDirChar(boolean handleDirChar) {
  -        this.handleDirChar = handleDirChar;
  +    public void setHandleDirSep(boolean handleDirSep) {
  +        this.handleDirSep = handleDirSep;
       }
   
       /**
  @@ -102,7 +102,7 @@
        *         null if the to pattern did not match
        */
       public String[] mapFileName(String sourceFileName) {
  -        if (handleDirChar) {
  +        if (handleDirSep) {
               if (sourceFileName.indexOf("\\") != -1) {
                   sourceFileName = sourceFileName.replace('\\', '/');
               }
  
  
  
  1.2       +2 -2      ant/src/testcases/org/apache/tools/ant/types/mappers/GlobMapperTest.java
  
  Index: GlobMapperTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/types/mappers/GlobMapperTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GlobMapperTest.java	17 Dec 2004 13:24:36 -0000	1.1
  +++ GlobMapperTest.java	25 Mar 2005 12:28:59 -0000	1.2
  @@ -34,8 +34,8 @@
       public void testIgnoreCase() {
           executeTarget("ignore.case");
       }
  -    public void testHandleDirChar() {
  -        executeTarget("handle.dirchar");
  +    public void testHandleDirSep() {
  +        executeTarget("handle.dirsep");
       }
   }
   
  
  
  
  1.2       +2 -2      ant/src/testcases/org/apache/tools/ant/types/mappers/RegexpPatternMapperTest.java
  
  Index: RegexpPatternMapperTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/types/mappers/RegexpPatternMapperTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RegexpPatternMapperTest.java	17 Dec 2004 13:24:36 -0000	1.1
  +++ RegexpPatternMapperTest.java	25 Mar 2005 12:28:59 -0000	1.2
  @@ -34,8 +34,8 @@
       public void testIgnoreCase() {
           executeTarget("ignore.case");
       }
  -    public void testHandleDirChar() {
  -        executeTarget("handle.dirchar");
  +    public void testHandleDirSep() {
  +        executeTarget("handle.dirsep");
       }
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message