On 6/14/07, Matt Benson <gudnabrsam@yahoo.com> wrote:
> Urgh, looking over the PropertyHelper stuff, I wonder
> if we shouldn't refactor it somewhat. It seems to be
> overly complex to allow full PropertyHelper delegates.
Yes it is overly complex.
(and full of bugs - esp with regard to child projects)
> It seems that we might be better off using a single
> PropertyHelper (still replaceable) and adding Lists of
> getPropertyResolvers and setPropertyResolvers.
This would be the way to go.
Perhaps something like:
interface GetPropertyResolver {
String resolve(Project a, String property);
// return null if not resolved
}
interface SetPropertyResolver {
boolean setProperty(Project a, String property, String value)
returns true if property consumed
return false if not
}
Peter
> One
> obvious problem of the current implementation seems to
> be that you can't do this:
>
> <property name="foo" value="foo.value" />
> <registerpropertyhelper>
> <chain>
> <bashextendedpropertyhelper />
> </chain>
> </registerpropertyhelper>
> <echo>${foo:1,1}</echo>
>
> Because the PH that knows how to handle the extended
> syntax wasn't around when "foo" was set and thus won't
> know about the foo property (I could be wrong but this
> is my impression of what the code is doing). This
> seems broken and extremely counter-intuitive to me. I
> am going to look into an extensive refactor of PH and
> if we determine that necessitates 1.8, well, so be it.
> :|
>
> -Matt
>
> [SNIP]
>
>
>
>
> ____________________________________________________________________________________
> Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo!
Answers - Check it out.
> http://answers.yahoo.com/dir/?link=list&sid=396545433
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
|