----- Original Message -----
From: "Peter Donald" <[EMAIL PROTECTED]>
> > How about making Project have another constructor that takes a Hashtable
of
> > properties to initialize it with? This would require some refactoring
in
> > Ant.initializeProject() so that it builds a temporary Hashtable of
> > properties and constructs (although the re-working of things might cause
> > some issues, not sure) the Project object using the properties
constructor
> > instead of the empty one.
>
> that sounds good to me ... but then again I am not the most familiar with
> this - Stefan ? Conor ?
Actually this turns out to be a bit of a mess. I started digging into
making these changes. Let me try to summarize what I've found:
- <ant>/<antcall> use the Property task internally to set properties to the
the new Project instance.
- To set the properties as user properties, they take advantage of
Project.setUserProperty - which I deprecated in my patch.
- We still need the rich features that the Property task gives us within the
context of <ant>/<antcall>, and we still need to be able to define those
properties as user properties on the new Project instance.
How do we get a Project initialized with user properties without going
through a deprecated API?
Project.setUserProperty is still the same.
Here are some thoughts on how to proceed:
- Un-deprecate the piece in Property.addProperty where it calls
setUserProperty.
- Keep setUserProperty deprecated (perhaps even remove it since only
<ant>/<antcall> relied on it, and it was never documented).
- Add a constructor: Property(boolean userProperty) - this would get called
from Ant.createProperty. - this would allow Property to set user properties,
but only if the boolean argument constructor argument was called with
"true" - not something that could be done with a build file <property>.
It seems that I stumbled upon some other roadblocks in this, but I can't
recall them at the moment. Let me know if you think the above modifications
will do the trick.
Thanks,
Erik
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>