ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs MatchingTask.java
Date Wed, 23 Feb 2000 21:11:17 GMT
rubys       00/02/23 13:11:17

  Modified:    src/main/org/apache/tools/ant ProjectHelper.java
               src/main/org/apache/tools/ant/taskdefs MatchingTask.java
  Log:
  Change design pattern for nested elements from "addBar" to "createBar"
  based on a suggestion by Costin.
  
  Revision  Changes    Path
  1.6       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProjectHelper.java	2000/02/15 03:58:19	1.5
  +++ ProjectHelper.java	2000/02/23 21:11:16	1.6
  @@ -253,7 +253,7 @@
               if (node.getNodeType() == Node.ELEMENT_NODE) {
                   Element element = (Element)node;
                   String propType = element.getTagName();
  -                String methodName = "add" +
  +                String methodName = "create" +
   		    Character.toUpperCase(propType.charAt(0)) +
                       propType.substring(1);
   
  
  
  
  1.3       +7 -7      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
  
  Index: MatchingTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MatchingTask.java	2000/02/16 03:24:44	1.2
  +++ MatchingTask.java	2000/02/23 21:11:17	1.3
  @@ -102,7 +102,7 @@
       /**
        * add a name entry on the include list
        */
  -    public NameEntry addInclude() {
  +    public NameEntry createInclude() {
           NameEntry result = new NameEntry();
           includeList.addElement(result);
           return result;
  @@ -111,7 +111,7 @@
       /**
        * add a name entry on the exclude list
        */
  -    public NameEntry addExclude() {
  +    public NameEntry createExclude() {
           NameEntry result = new NameEntry();
           excludeList.addElement(result);
           return result;
  @@ -125,7 +125,7 @@
        */
       public void setIncludes(String includes) {
           if (includes != null && includes.length() > 0) {
  -            addInclude().setName(includes);
  +            createInclude().setName(includes);
           }
       }
   
  @@ -141,13 +141,13 @@
                       "Please use the includes attribute.",
                       Project.MSG_WARN);
           if (itemString == null || itemString.equals("*")) {
  -            addInclude().setName("**");
  +            createInclude().setName("**");
           } else {
               StringTokenizer tok = new StringTokenizer(itemString, ", ");
               while (tok.hasMoreTokens()) {
                   String pattern = tok.nextToken().trim();
                   if (pattern.length() > 0) {
  -                    addInclude().setName(pattern+"/**");
  +                    createInclude().setName(pattern+"/**");
                   }
               }
           }
  @@ -161,7 +161,7 @@
        */
       public void setExcludes(String excludes) {
           if (excludes != null && excludes.length() > 0) {
  -            addExclude().setName(excludes);
  +            createExclude().setName(excludes);
           }
       }
   
  @@ -179,7 +179,7 @@
               Vector tmpExcludes = new Vector();
               StringTokenizer tok = new StringTokenizer(ignoreString, ", ", false);
               while (tok.hasMoreTokens()) {
  -                addExclude().setName("**/"+tok.nextToken().trim()+"/**");
  +                createExclude().setName("**/"+tok.nextToken().trim()+"/**");
               }
           }
       }
  
  
  

Mime
View raw message