committers,

okay well the change i have made is very limited and does allow the subproject
spawned by the ant task to set its parent's patternsets. since patternsets are
just one of the 'references' kept i have restricted the pass thru to just allow
patternsets. In the Ant.java immediately after

        // set user-define properties
        Hashtable prop1 = project.getProperties();
        e = prop1.keys();
        while (e.hasMoreElements()) {
            String arg = (String) e.nextElement();
            String value = (String) prop1.get(arg);
            p1.setProperty(arg, value);
        }

i added this piece

        /*
         * set user-define patternsets
         * patternset is _one_ of the object types held as references
         */
        Hashtable refs1 = project.getReferences();
        e = refs1.keys();
        while (e.hasMoreElements()) {
            String arg = (String) e.nextElement();
            Object value = (Object) refs1.get(arg);
            if (value.getClass().getName().indexOf("PatternSet")!=-1) {
                p1.addReference(arg, value);
            }
        }

hope this makes the grade !
rgds, tim

Peter Donald wrote:

> At 04:40  8/2/01 +0000, Tim Stephenson wrote:
> >  <ant antfile="${build}/subproject.xml" dir="${basedir}" target="main">
> >
> >    <patternset refid="test"/>
> >  </ant>
> >
> >i know ant accepts nested properties which may have a refid to a path
> >like structure, but i can't quite seem to achieve what i need with that
> >(unless i missed something)
> >
> >is there any reason why i shouldn't do this? is it likely to be included
> >into the codeline?
>
> In Ant2.x we will be allowing such things. It would be nice to have them in
> Ant1.x but we have to make sure that it is either un-documented or we
> document it as being incompatable with Ant2.x. The reason is that Ant2.x
> will most likely unify the namespace for patternsets and properties.
>
> Cheers,
>
> Pete
>
> *-----------------------------------------------------*
> | "Faced with the choice between changing one's mind, |
> | and proving that there is no need to do so - almost |
> | everyone gets busy on the proof."                   |
> |              - John Kenneth Galbraith               |
> *-----------------------------------------------------*
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to