ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types PatternSet.java
Date Wed, 12 Dec 2001 09:17:36 GMT
bodewig     01/12/12 01:17:36

  Modified:    src/main/org/apache/tools/ant Project.java Target.java
               src/main/org/apache/tools/ant/taskdefs Echo.java Exit.java
                        Javadoc.java Property.java SQLExec.java
               src/main/org/apache/tools/ant/types PatternSet.java
  Log:
  Replace ProjectHelper.replaceProperties calls with a new one-arg
  method in project.
  
  Revision  Changes    Path
  1.87      +11 -0     jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- Project.java	2001/12/10 15:38:59	1.86
  +++ Project.java	2001/12/12 09:17:36	1.87
  @@ -371,6 +371,17 @@
       }
   
       /**
  +     * Replace ${} style constructions in the given value with the
  +     * string value of the corresponding data types.
  +     *
  +     * @param value the string to be scanned for property references.
  +     */
  +    public String replaceProperties(String value)
  +        throws BuildException { 
  +        return ProjectHelper.replaceProperties(this, value);
  +    }
  +
  +    /**
        * query a user property.
        * @param name the name of the property
        * @return the property value, or null for no match
  
  
  
  1.29      +2 -2      jakarta-ant/src/main/org/apache/tools/ant/Target.java
  
  Index: Target.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Target.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Target.java	2001/12/12 08:48:42	1.28
  +++ Target.java	2001/12/12 09:17:36	1.29
  @@ -222,7 +222,7 @@
               return true;
           }
           
  -        String test = ProjectHelper.replaceProperties(getProject(), ifCondition);
  +        String test = project.replaceProperties(ifCondition);
           return project.getProperty(test) != null;
       }
   
  @@ -230,7 +230,7 @@
           if ("".equals(unlessCondition)) {
               return true;
           }
  -        String test = ProjectHelper.replaceProperties(getProject(), unlessCondition);
  +        String test = project.replaceProperties(unlessCondition);
           return project.getProperty(test) == null;
       }
   
  
  
  
  1.10      +1 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Echo.java
  
  Index: Echo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Echo.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Echo.java	2001/12/01 03:34:35	1.9
  +++ Echo.java	2001/12/12 09:17:36	1.10
  @@ -127,8 +127,7 @@
        * Set a multiline message.
        */
       public void addText(String msg) {
  -        message += 
  -            ProjectHelper.replaceProperties(project, msg);
  +        message += project.replaceProperties(msg);
       }
   
       /**
  
  
  
  1.8       +1 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exit.java
  
  Index: Exit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exit.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Exit.java	2001/12/12 08:48:42	1.7
  +++ Exit.java	2001/12/12 09:17:36	1.8
  @@ -94,8 +94,7 @@
        * Set a multiline message.
        */
       public void addText(String msg) {
  -        message += 
  -            ProjectHelper.replaceProperties(project, msg);
  +        message += project.replaceProperties(msg);
       }
   
       private boolean testIfCondition() {
  
  
  
  1.68      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- Javadoc.java	2001/12/01 03:34:35	1.67
  +++ Javadoc.java	2001/12/12 09:17:36	1.68
  @@ -1146,7 +1146,7 @@
        * Convenience method to expand properties.
        */
       protected String expand(String content) {
  -        return ProjectHelper.replaceProperties(project, content);
  +        return project.replaceProperties(content);
       }
   
       private String getJavadocExecutableName()
  
  
  
  1.38      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Property.java	2001/12/06 09:11:16	1.37
  +++ Property.java	2001/12/12 09:17:36	1.38
  @@ -289,7 +289,7 @@
               String name = (String) e.nextElement();
               String value = (String) props.getProperty(name);
   
  -            String v = ProjectHelper.replaceProperties(project, value);
  +            String v = project.replaceProperties(value);
               addProperty(name, v);
           }
       }
  
  
  
  1.27      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  
  Index: SQLExec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- SQLExec.java	2001/12/01 03:34:35	1.26
  +++ SQLExec.java	2001/12/12 09:17:36	1.27
  @@ -533,7 +533,7 @@
           try{
               while ((line=in.readLine()) != null){
                   line = line.trim();
  -                line = ProjectHelper.replaceProperties(project, line);
  +                line = project.replaceProperties(line);
                   if (line.startsWith("//")) continue;
                   if (line.startsWith("--")) continue;
                   StringTokenizer st = new StringTokenizer(line);
  
  
  
  1.15      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/types/PatternSet.java
  
  Index: PatternSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/PatternSet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PatternSet.java	2001/12/01 03:34:35	1.14
  +++ PatternSet.java	2001/12/12 09:17:36	1.15
  @@ -291,7 +291,7 @@
               String line = patternReader.readLine();
               while (line != null) {
                   if (line.length() > 0) {
  -                    line = ProjectHelper.replaceProperties(p, line);
  +                    line = p.replaceProperties(line);
                       addPatternToList(patternlist).setName(line);
                   }
                   line = patternReader.readLine();
  
  
  

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


Mime
View raw message