ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound AntSoundPlayer.java
Date Sun, 16 Dec 2001 06:40:17 GMT
donaldp     01/12/15 22:40:17

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
                        Checksum.java ConditionTask.java ExecTask.java
                        Javadoc.java PathConvert.java Property.java
                        Tstamp.java WaitFor.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional
                        Script.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound
                        AntSoundPlayer.java
  Log:
  project.setNewProperty() --> setProperty
  
  which inherited from AbstractTask and delegates to TaskContext.
  
  Revision  Changes    Path
  1.6       +1 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java
  
  Index: Checksum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Checksum.java	2001/12/16 06:21:40	1.5
  +++ Checksum.java	2001/12/16 06:40:16	1.6
  @@ -188,8 +188,7 @@
           boolean value = validateAndExecute();
           if( verifyProperty != null )
           {
  -            project.setNewProperty( verifyProperty,
  -                                    new Boolean( value ).toString() );
  +            setProperty( verifyProperty, new Boolean( value ).toString() );
           }
       }
   
  
  
  
  1.4       +2 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java
  
  Index: ConditionTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConditionTask.java	2001/12/16 00:38:01	1.3
  +++ ConditionTask.java	2001/12/16 06:40:16	1.4
  @@ -21,7 +21,7 @@
    * This task does not extend Task to take advantage of ConditionBase.</p>
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class ConditionTask extends ConditionBase
   {
  @@ -71,7 +71,7 @@
           Condition c = (Condition)getConditions().nextElement();
           if( c.eval() )
           {
  -            getProject().setNewProperty( property, value );
  +            setProperty( property, value );
           }
       }
   }
  
  
  
  1.8       +3 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  
  Index: ExecTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ExecTask.java	2001/12/16 06:21:40	1.7
  +++ ExecTask.java	2001/12/16 06:40:16	1.8
  @@ -267,7 +267,7 @@
                   }
                   val.append( line );
               }
  -            project.setNewProperty( outputprop, val.toString() );
  +            setProperty( outputprop, val.toString() );
           }
       }
   
  @@ -370,11 +370,12 @@
        * @param result Description of Parameter
        */
       protected void maybeSetResultPropertyValue( int result )
  +    throws TaskException
       {
           String res = Integer.toString( result );
           if( resultProperty != null )
           {
  -            project.setNewProperty( resultProperty, res );
  +            setProperty( resultProperty, res );
           }
       }
   
  
  
  
  1.6       +1 -3      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Javadoc.java	2001/12/16 04:12:39	1.5
  +++ Javadoc.java	2001/12/16 06:40:16	1.6
  @@ -1028,9 +1028,7 @@
               }
               else
               {
  -                project.log( this,
  -                             "Warning: Leaving out empty argument '" + key + "'",
  -                             Project.MSG_WARN );
  +                log( "Warning: Leaving out empty argument '" + key + "'", Project.MSG_WARN
);
               }
           }
       }
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
  
  Index: PathConvert.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PathConvert.java	2001/12/16 02:05:41	1.3
  +++ PathConvert.java	2001/12/16 06:40:16	1.4
  @@ -226,7 +226,7 @@
   
           log( "Set property " + property + " = " + value, Project.MSG_VERBOSE );
   
  -        getProject().setNewProperty( property, value );
  +        setProperty( property, value );
       }
   
       /**
  
  
  
  1.10      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Property.java	2001/12/16 06:21:40	1.9
  +++ Property.java	2001/12/16 06:40:16	1.10
  @@ -200,8 +200,9 @@
       }
   
       protected void addProperty( String n, String v )
  +        throws TaskException
       {
  -            project.setNewProperty( n, v );
  +        setProperty( n, v );
       }
   
       protected void loadEnvironment( String prefix )
  
  
  
  1.7       +4 -4      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
  
  Index: Tstamp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Tstamp.java	2001/12/16 04:43:51	1.6
  +++ Tstamp.java	2001/12/16 06:40:16	1.7
  @@ -61,13 +61,13 @@
               Date d = new Date();
   
               SimpleDateFormat dstamp = new SimpleDateFormat( "yyyyMMdd" );
  -            project.setNewProperty( prefix + "DSTAMP", dstamp.format( d ) );
  +            setProperty( prefix + "DSTAMP", dstamp.format( d ) );
   
               SimpleDateFormat tstamp = new SimpleDateFormat( "HHmm" );
  -            project.setNewProperty( prefix + "TSTAMP", tstamp.format( d ) );
  +            setProperty( prefix + "TSTAMP", tstamp.format( d ) );
   
               SimpleDateFormat today = new SimpleDateFormat( "MMMM d yyyy", Locale.US );
  -            project.setNewProperty( prefix + "TODAY", today.format( d ) );
  +            setProperty( prefix + "TODAY", today.format( d ) );
   
               Enumeration i = customFormats.elements();
               while( i.hasMoreElements() )
  @@ -243,7 +243,7 @@
               {
                   sdf.setTimeZone( timeZone );
               }
  -            project.setNewProperty( propertyName, sdf.format( date ) );
  +            getContext().setProperty( propertyName, sdf.format( date ) );
           }
       }
   }
  
  
  
  1.3       +1 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/WaitFor.java
  
  Index: WaitFor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/WaitFor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WaitFor.java	2001/12/16 00:38:01	1.2
  +++ WaitFor.java	2001/12/16 06:40:16	1.3
  @@ -134,7 +134,7 @@
   
           if( timeoutProperty != null )
           {
  -            project.setNewProperty( timeoutProperty, "true" );
  +            setProperty( timeoutProperty, "true" );
           }
       }
   
  
  
  
  1.5       +0 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
  
  Index: Script.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Script.java	2001/12/16 06:21:40	1.4
  +++ Script.java	2001/12/16 06:40:17	1.5
  @@ -87,7 +87,6 @@
           try
           {
               addBeans( project.getProperties() );
  -            addBeans( project.getTargets() );
               addBeans( project.getReferences() );
   
               beans.put( "project", getProject() );
  
  
  
  1.4       +4 -4      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java
  
  Index: AntSoundPlayer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AntSoundPlayer.java	2001/12/16 04:47:49	1.3
  +++ AntSoundPlayer.java	2001/12/16 06:40:17	1.4
  @@ -31,7 +31,7 @@
    * Both seem to work fine.
    *
    * @author Nick Pellow
  - * @version $Revision: 1.3 $, $Date: 2001/12/16 04:47:49 $
  + * @version $Revision: 1.4 $, $Date: 2001/12/16 06:40:17 $
    */
   
   public class AntSoundPlayer
  @@ -205,7 +205,7 @@
           }
           catch( UnsupportedAudioFileException uafe )
           {
  -            project.log( "Audio format is not yet supported: " + uafe.getMessage() );
  +            project.log( "Audio format is not yet supported: " + uafe.getMessage(), Project.MSG_INFO
);
           }
           catch( IOException ioe )
           {
  @@ -225,7 +225,7 @@
               }
               catch( LineUnavailableException e )
               {
  -                project.log( "The sound device is currently unavailable" );
  +                project.log( "The sound device is currently unavailable", Project.MSG_INFO
);
                   return;
               }
               catch( IOException e )
  @@ -246,7 +246,7 @@
           }
           else
           {
  -            project.log( "Can't get data from file " + file.getName() );
  +            project.log( "Can't get data from file " + file.getName(), Project.MSG_INFO
);
           }
       }
   
  
  
  

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