ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project AntParam.java Resources.properties
Date Tue, 25 Jun 2002 07:20:33 GMT
adammurdoch    2002/06/25 00:20:33

  Modified:    antlib/src/java/org/apache/antlib/core Property.java
               antlib/src/java/org/apache/antlib/project AntParam.java
                        Resources.properties
  Log:
  - Changed Property.add() to take an Object, instead of a DataType.
  - Added support for nested data-types to <param> elements in <ant>/<ant-call>.
  
  Revision  Changes    Path
  1.2       +2 -3      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/Property.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Property.java	14 Apr 2002 10:55:08 -0000	1.1
  +++ Property.java	25 Jun 2002 07:20:33 -0000	1.2
  @@ -11,7 +11,6 @@
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.framework.DataType;
   
   /**
    * This is the property "task" to declare a binding of a datatype to a name.
  @@ -39,7 +38,7 @@
       /**
        * Sets the property value from a nested element.
        */
  -    public void add( final DataType value )
  +    public void add( final Object value )
           throws TaskException
       {
           setValue( value );
  
  
  
  1.2       +15 -2     jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/AntParam.java
  
  Index: AntParam.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/AntParam.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AntParam.java	3 May 2002 10:34:02 -0000	1.1
  +++ AntParam.java	25 Jun 2002 07:20:33 -0000	1.2
  @@ -42,9 +42,22 @@
        *
        * @param value the parameter value
        */
  -    public void setValue( final Object value )
  +    public void setValue( final Object value ) throws TaskException
       {
  +        if( m_value != null )
  +        {
  +            final String message = REZ.getString( "param.too-many-values.error" );
  +            throw new TaskException( message );
  +        }
           m_value = value;
  +    }
  +
  +    /**
  +     * Adds a nested value.
  +     */
  +    public void add( final Object value ) throws TaskException
  +    {
  +        setValue( value );
       }
   
       /**
  
  
  
  1.13      +1 -0      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/Resources.properties,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Resources.properties	11 Jun 2002 13:20:15 -0000	1.12
  +++ Resources.properties	25 Jun 2002 07:20:33 -0000	1.13
  @@ -4,5 +4,6 @@
   
   param.noname.error=Missing name from parameter.
   param.novalue.error=Missing value from parameter "{0}".
  +param.too-many-values.error=Too many values for parameter.
   
   project.no-project-element.error=Project file must be enclosed in project element.
  
  
  

--
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