AW: Question about simple nested text elements

2010-02-07 Thread Jan.Materne
Main problem was having the nested classes as 'static. Jan import java.util.ArrayList; import java.util.List; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.DataType; public class MyTask extends Task { // Hold a list of real Things-

Re: AW: Question about simple nested text elements

2010-02-05 Thread scabbage
Jan, Thanks for the help. Following your suggestion, this is what I have: public class MyTask extends Task { private String a; private String b; private List things = new ArrayList(); public void execute() { for (String t : things) System.out.println (t)

AW: Question about simple nested text elements

2010-02-04 Thread Jan.Materne
You have several things: - add to class MyTask extends Task { addThings(Things t) - add to class Things extends DataType { addThing(Thing t) - add text to class Thing extends DataType { addText(String t) For documentation: * Tutorial about writing tasks http://ant.apache.org/manual/t