> From: Jack J. Woehr [mailto:[EMAIL PROTECTED] 
> 
> Matt Benson wrote:
> 
> > We could create a new property
> > ant.PropertyHelper.classname or some such, to allow
> > users a comfortable way to avoid the situation above,
> > but AFAICT the issue still exists.
> 
> Well, some of what you are talking about is a little deeper 
> in Ant-fu than I care to go for this particular exercise ... 
> I'll just change the PropertyHelper class to make this work 
> and do it neatly so it's easy to extract the little bit of 
> code needed to make this work (one new short source file and 
> a new function in PropertyHelper) and then maybe if it's 
> likeable enough someone will move the code into the proper 
> hook relationship with tao of Ant ....

Well, it seem to me the problem is deeper. Without looking at the code
and directly from old memory banks. I seem to remember that
the way property substitution works is something like this:

1) get the text that needs substitutions
2) Chop the text into segments (each end of segment is a place where
substitution is needed.
3) After chopping you get two vectors, one of texts and one of
properties to replace
4) Call property helper on each one of the properties
5) Reassemble all toghether

Presto....

So what needs to be change is the chopping part, but this is dependant
on the syntax for the PropertyHelper and not something fix.
The case of recursive properties is just an example.

I guess, the way to do it properly is to use something like the way
java.text.Format
works. You find the beginning of a property reference and the
PropertyHelper chain is the one that tells you where is the end pf the
property
and the beginning of the rest of the code.

Such strategy would allow writing property evaluators that contain real
complex expressions inside. Which we have discussed in the past.

Anything else, I think it will be just like a hack that will break
something else.
(Well as long as my recollection of how the thing works is still
correct) ;-)

Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to