ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: new Task subclass
Date Tue, 20 Jul 2004 05:49:29 GMT
IMHO it doesnt make sense:
1. We have no real consense how we want handle conditional tasks
   - for all tasks / only for a few
   - via if/unless or via nested <condition>s or something new?
2. Havent count them but I think there arent so many tasks that we
   should introduce another hierarchy step. Especially an if/unless
   doesnt really do much complicated. Maybe a helper class could be
   useful - something like
       public class IfUnlessHelper {
           String if;     // getter, setter
           String unless; // getter, setter
           public boolean isValid() { 
               // code from such a ProjectComponent, e.g. <target>
           }
       }
   Used inside the ProjectComponents like
       public class Target {
           IfUnlessHelper iuh = new...
           public void setIf(String s) { iuf.setIf(s); }
           public void setUnless ...
           public void execute() {
               if (!iuh.isValid) { return; }
           }
       }

Jan
           


> -----Urspr√ľngliche Nachricht-----
> Von: Mike Jennings [mailto:mike@southgatesoftware.com]
> Gesendet am: Montag, 19. Juli 2004 15:30
> An: dev@ant.apache.org
> Betreff: new Task subclass
> 
> Hi,
> 
> I was thinking that all of the core tasks that have if= and 
> unless= attributes
> could have a common ancestor which would be a subclass of 
> org.apache.tools.ant.Task
> 
> Is there an obvious reason to not do this? If this makes 
> sense I can code it up
> and submit it.
> 
> -Mike
> 
> ________________________
> Mike Jennings
> Southgate Software Ltd
> (250) 382-6851 tel
> (250) 818-5230 cel
> (250) 592-6851 fax
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message