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:[EMAIL PROTECTED]
> Gesendet am: Montag, 19. Juli 2004 15:30
> An: [EMAIL PROTECTED]
> 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
> 

Reply via email to