You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2005/02/18 23:07:36 UTC

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

stevel      2005/02/18 14:07:36

  Modified:    src/main/org/apache/tools/ant Task.java
  Log:
  Move the logic to bind a created task to an existing one into Task.
  
  Revision  Changes    Path
  1.63      +14 -0     ant/src/main/org/apache/tools/ant/Task.java
  
  Index: Task.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Task.java,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- Task.java	28 Jan 2005 17:27:09 -0000	1.62
  +++ Task.java	18 Feb 2005 22:07:36 -0000	1.63
  @@ -475,4 +475,18 @@
       protected RuntimeConfigurable getWrapper() {
           return wrapper;
       }
  +
  +    /**
  +     * Bind a task to another; use this when configuring a newly created
  +     * task to do work on behalf of another.
  +     * Project, OwningTarget, TaskName, Location and Description are all copied
  +     * @param owner owning target
  +     */
  +    public final void bindToOwner(Task owner) {
  +        setProject(owner.getProject());
  +        setOwningTarget(owner.getOwningTarget());
  +        setTaskName(owner.getTaskName());
  +        setDescription(owner.getDescription());
  +        setLocation(owner.getLocation());
  +    }
   }
  
  
  

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