You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2003/11/13 19:12:24 UTC

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs MacroInstance.java

peterreilly    2003/11/13 10:12:24

  Modified:    src/main/org/apache/tools/ant/taskdefs MacroInstance.java
  Log:
  MacroInstance: if owningtarget not set, use a default
  MacroInstance: if id is as an attribute, check if this is in the
                 macros attribute list and if not ignore
  
  Revision  Changes    Path
  1.9       +11 -1     ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java
  
  Index: MacroInstance.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MacroInstance.java	6 Nov 2003 14:57:10 -0000	1.8
  +++ MacroInstance.java	13 Nov 2003 18:12:24 -0000	1.9
  @@ -68,6 +68,7 @@
   import org.apache.tools.ant.DynamicConfigurator;
   import org.apache.tools.ant.ProjectHelper;
   import org.apache.tools.ant.RuntimeConfigurable;
  +import org.apache.tools.ant.Target;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.TaskContainer;
   import org.apache.tools.ant.UnknownElement;
  @@ -187,7 +188,13 @@
           ret.setQName(ue.getQName());
           ret.setTaskName(ue.getTaskName());
           ret.setLocation(ue.getLocation());
  -        ret.setOwningTarget(getOwningTarget());
  +        if (getOwningTarget() == null) {
  +            Target t = new Target();
  +            t.setProject(getProject());
  +            ret.setOwningTarget(t);
  +        } else {
  +            ret.setOwningTarget(getOwningTarget());
  +        }
           RuntimeConfigurable rc = new RuntimeConfigurable(
               ret, ue.getTaskName());
           rc.setPolyType(ue.getWrapper().getPolyType());
  @@ -255,6 +262,9 @@
               }
               localProperties.put(attribute.getName(), value);
               copyKeys.remove(attribute.getName());
  +        }
  +        if (copyKeys.contains("id")) {
  +            copyKeys.remove("id");
           }
           if (copyKeys.size() != 0) {
               throw new BuildException(
  
  
  

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


Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs MacroInstance.java

Posted by Alok Ranjan <to...@yahoo.com>.
hi,


i read this but i cant get what actually this code
would be done is it done somthing like auto adding 
to the cvs repostry fron <cvs> tag.
 
i have a problem to add files in my modules which ae
checked out from the repositry how i can accomplish it

through <cvs> tag by without entering in the diretory.
alok ranjan singh.
--- peterreilly@apache.org wrote:
> peterreilly    2003/11/13 10:12:24
> 
>   Modified:   
> src/main/org/apache/tools/ant/taskdefs
> MacroInstance.java
>   Log:
>   MacroInstance: if owningtarget not set, use a
> default
>   MacroInstance: if id is as an attribute, check if
> this is in the
>                  macros attribute list and if not
> ignore
>   
>   Revision  Changes    Path
>   1.9       +11 -1    
>
ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java
>   
>   Index: MacroInstance.java
>  
>
===================================================================
>   RCS file:
>
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java,v
>   retrieving revision 1.8
>   retrieving revision 1.9
>   diff -u -r1.8 -r1.9
>   --- MacroInstance.java	6 Nov 2003 14:57:10 -0000
> 1.8
>   +++ MacroInstance.java	13 Nov 2003 18:12:24 -0000
> 1.9
>   @@ -68,6 +68,7 @@
>    import org.apache.tools.ant.DynamicConfigurator;
>    import org.apache.tools.ant.ProjectHelper;
>    import org.apache.tools.ant.RuntimeConfigurable;
>   +import org.apache.tools.ant.Target;
>    import org.apache.tools.ant.Task;
>    import org.apache.tools.ant.TaskContainer;
>    import org.apache.tools.ant.UnknownElement;
>   @@ -187,7 +188,13 @@
>            ret.setQName(ue.getQName());
>            ret.setTaskName(ue.getTaskName());
>            ret.setLocation(ue.getLocation());
>   -        ret.setOwningTarget(getOwningTarget());
>   +        if (getOwningTarget() == null) {
>   +            Target t = new Target();
>   +            t.setProject(getProject());
>   +            ret.setOwningTarget(t);
>   +        } else {
>   +           
> ret.setOwningTarget(getOwningTarget());
>   +        }
>            RuntimeConfigurable rc = new
> RuntimeConfigurable(
>                ret, ue.getTaskName());
>           
> rc.setPolyType(ue.getWrapper().getPolyType());
>   @@ -255,6 +262,9 @@
>                }
>               
> localProperties.put(attribute.getName(), value);
>                copyKeys.remove(attribute.getName());
>   +        }
>   +        if (copyKeys.contains("id")) {
>   +            copyKeys.remove("id");
>            }
>            if (copyKeys.size() != 0) {
>                throw new BuildException(
>   
>   
>   
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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