Re: [lang] text.Interpolation, on to 2.2

2005-07-30 Thread Oliver Heger
Gary Gregory wrote: From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Sunday, July 17, 2005 12:11 PM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Hello Gary, the current state of VariableFormatter is fine with me, it allows me everything to do I need

RE: [lang] text.Interpolation, on to 2.2

2005-07-18 Thread Gary Gregory
From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Sunday, July 17, 2005 12:11 PM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Hello Gary, the current state of VariableFormatter is fine with me, it allows me everything to do I need

Re: [lang] text.Interpolation, on to 2.2

2005-07-17 Thread Oliver Heger
and all comments; in particular as to the use for [configuration]. Thanks, Gary -Original Message- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Sunday, July 10, 2005 11:45 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote

RE: [lang] text.Interpolation, on to 2.2

2005-07-14 Thread Gary Gregory
Message- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Sunday, July 10, 2005 11:45 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote: I would like us to reconsider the use of the VariableResolver interface for VariableFormatter

Re: [lang] text.Interpolation, on to 2.2

2005-07-10 Thread Oliver Heger
Gary Gregory wrote: I would like us to reconsider the use of the VariableResolver interface for VariableFormatter. It seems that this is a cleaner design that does not force subclassing or composition as the sole mean of feature extension. Considering the complexity of the StrTokenizer

Re: [lang] text.Interpolation, on to 2.2

2005-07-09 Thread Oliver Heger
Some comments inline... Stephen Colebourne wrote: Gary Gregory wrote: The source of values for the VariableFormat class is only allowed to be a Map. I'm not sure if people will want other types of data sources. Yes the resolveVariable method does allow customisation via subclassing but

Re: [lang] text.Interpolation, on to 2.2

2005-07-09 Thread Stephen Colebourne
a) we don't have the ability to call it directly from StrBuilder without copying the char array to a String. (VariableFormatter needs rewriting to operate on a char[]) Hmmm. I've just realised that this won't work. VariableFormatter may need to lengthen the array, and that isn't possible

RE: [lang] text.Interpolation, on to 2.2

2005-07-09 Thread Gary Gregory
In-lined at the end ... G From: Stephen Colebourne [mailto:[EMAIL PROTECTED] Sent: Saturday, July 09, 2005 6:32 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 a) we don't have the ability to call it directly from StrBuilder without copying

RE: [lang] text.Interpolation, on to 2.2

2005-07-09 Thread Gary Gregory
: Re: [lang] text.Interpolation, on to 2.2 Some comments inline... Stephen Colebourne wrote: Gary Gregory wrote: The source of values for the VariableFormat class is only allowed to be a Map. I'm not sure if people will want other types of data sources. Yes the resolveVariable

RE: [lang] text.Interpolation, on to 2.2

2005-07-08 Thread Gary Gregory
-Original Message- From: Stephen Colebourne [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 06, 2005 4:11 PM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote: The source of values for the VariableFormat class is only allowed

RE: [lang] text.Interpolation, on to 2.2

2005-07-06 Thread Gary Gregory
From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 9:38 PM To: Jakarta Commons Developers List Subject: RE: [lang] text.Interpolation, on to 2.2 On Wed, 2005-06-29 at 20:24 -0400, Gary Gregory wrote: What I like about the *Format name is that it relates

Re: [lang] text.Interpolation, on to 2.2

2005-07-06 Thread Stephen Colebourne
Gary Gregory wrote: The source of values for the VariableFormat class is only allowed to be a Map. I'm not sure if people will want other types of data sources. Yes the resolveVariable method does allow customisation via subclassing but the fact that the default source is a map is very

RE: [lang] text.Interpolation, on to 2.2

2005-07-05 Thread Simon Kitching
On Wed, 2005-06-29 at 20:24 -0400, Gary Gregory wrote: What I like about the *Format name is that it relates it to the java.text.*Format classes, specifically to the MessageFormat class. From the MessageFormat javadoc: MessageFormat provides a means to produce concatenated messages in

RE: [lang] text.Interpolation, on to 2.2

2005-07-03 Thread Gary Gregory
Thank you Oliver. I'll be taking a look over the weekend. Gary -Original Message- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Saturday, July 02, 2005 11:42 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote

Re: [lang] text.Interpolation, on to 2.2

2005-07-02 Thread Oliver Heger
Gary Gregory wrote: Oliver, Would you be willing to have a go at creating these classes for lang? Thanks, Gary A first implementation can be found at the new BZ ticket 35588: http://issues.apache.org/bugzilla/show_bug.cgi?id=35588 Comments are welcome! Oliver

Re: [lang] text.Interpolation, on to 2.2

2005-06-30 Thread Oliver Heger
Gary Gregory wrote: Oliver (or anyone else), would you be willing to take a first cut at porting your patch in the Bugzilla ticket referred to earlier to this current scheme? We could then put it in CVS with unit tests and see how it feels to all of us once in code form. Gary Okay, I can do

RE: [lang] text.Interpolation, on to 2.2

2005-06-30 Thread Gary Gregory
-Original Message- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 29, 2005 11:32 PM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote: Oliver (or anyone else), would you be willing to take a first cut

Re: [lang] text.Interpolation, on to 2.2

2005-06-30 Thread Oliver Heger
Gary Gregory wrote: -Original Message- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 29, 2005 11:32 PM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote: Oliver (or anyone else), would you be willing

RE: [lang] text.Interpolation, on to 2.2

2005-06-30 Thread Gary Gregory
Oliver wrote: Yes, the base method returns an Object, and there are several convenience methods that cast this result to a String. This is what I had in mind, too. Oliver, Would you be willing to have a go at creating these classes for lang? Thanks, Gary

Re: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Oliver Heger
Emmanuel Bourg wrote: Simon Kitching wrote: You mean that someone with special resolving requirements should provide a custom class that implements Map? Yes that's what I mean. However for the other cases the user has to implement the Map interface which it's quite a lot of work. As the

RE: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Gary Gregory
To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Simon Kitching wrote: You mean that someone with special resolving requirements should provide a custom class that implements Map? Yes that's what I mean. However for the other cases the user has to implement

RE: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Gary Gregory
To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Emmanuel Bourg wrote: Simon Kitching wrote: You mean that someone with special resolving requirements should provide a custom class that implements Map? Yes that's what I mean. However for the other cases

Re: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Emmanuel Bourg
Gary Gregory wrote: Hi wait a sec, you cannot just let the other methods unimplemented, the code will not compile. All interface methods must be implemented, the bodies of void methods can be empty, others and can return nulls and 0's or throw exceptions, sure, but that seems confusing. By

RE: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Gary Gregory
- From: Emmanuel Bourg [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 29, 2005 8:47 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote: Hi wait a sec, you cannot just let the other methods unimplemented, the code will not compile. All

Re: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Oliver Heger
Gary Gregory wrote: Hm, I did not realize that being to f/w-ish was an issue, which is fine and seems clear now. How about this as a compromise (thinking aloud): The (currently imaginary) class VariableFormat holds a Map and defines a method VariableFormat#resolve(String name).

RE: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Gary Gregory
Oliver wrote: And to gain more convenience when directly called the VariableFormat class could still define a static method String replace(String source, Map map), which would internally create an instance, feed it with the passed in map and call the interpolation method on this instance. Seems

Re: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Stephen Colebourne
Gary Gregory wrote: How about this as a compromise (thinking aloud): The (currently imaginary) class VariableFormat holds a Map and defines a method VariableFormat#resolve(String name). [configuration] can subclass the class and override the VariableFormat#resolve(String name) to provide its

RE: [lang] text.Interpolation, on to 2.2

2005-06-29 Thread Gary Gregory
Gary Gregory wrote: How about this as a compromise (thinking aloud): The (currently imaginary) class VariableFormat holds a Map and defines a method VariableFormat#resolve(String name). [configuration] can subclass the class and override the VariableFormat#resolve(String name) to

Re: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Oliver Heger
:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 3:36 PM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote: Hello Oliver: I took a quick look at the ticket you linked to below. For this to work for System properties, a simple VariableResolver

RE: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Gary Gregory
[mailto:[EMAIL PROTECTED] Sent: Tuesday, June 28, 2005 1:20 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Hi, I suspected that the whole thing gets a bit out of scope for [lang] and now Stephen confirmed it. But okay, I can live with that. Just provide

Re: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Emmanuel Bourg
Gary Gregory wrote: - For [config]: Provide an Interpolation feature that it can build on. The [config] project, please correct me if I am off, must have a way to plug-in how to look stuff up, hence the nice and simple VariableResolver interface, which could be surfaced as: String s =

Re: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Oliver Heger
Emmanuel Bourg wrote: Gary Gregory wrote: - For [config]: Provide an Interpolation feature that it can build on. The [config] project, please correct me if I am off, must have a way to plug-in how to look stuff up, hence the nice and simple VariableResolver interface, which could be surfaced

RE: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Gary Gregory
text.VariableFormat and text.VariableResolver. Thoughts? Gary -Original Message- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 28, 2005 10:56 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Emmanuel Bourg wrote: Gary Gregory

RE: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Michael Heuer
Gary Gregory wrote: - (for me ;-) Provide an Interpolation feature that allows a simple way to use System properties to replace variables in a String. For me, this could be as simple as: String s = XXX.resolveAll(source, $, {, }, System.getProperties()); Maybe it is a bit of overkill,

RE: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Michael Heuer
Michael Heuer wrote: Gary Gregory wrote: - (for me ;-) Provide an Interpolation feature that allows a simple way to use System properties to replace variables in a String. For me, this could be as simple as: String s = XXX.resolveAll(source, $, {, }, System.getProperties());

Re: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Emmanuel Bourg
Dumb question, why do we even need a VariableResolver interface ? A String-Object association is a common job for a Map after all. We should be able to build a sophisticated resolver system in [configuration] with a simple resolve(String, Map) method in [lang]. Emmanuel Bourg

Re: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Simon Kitching
On Wed, 2005-06-29 at 01:38 +0200, Emmanuel Bourg wrote: Dumb question, why do we even need a VariableResolver interface ? A String-Object association is a common job for a Map after all. We should be able to build a sophisticated resolver system in [configuration] with a simple

Re: [lang] text.Interpolation, on to 2.2

2005-06-28 Thread Emmanuel Bourg
Simon Kitching wrote: You mean that someone with special resolving requirements should provide a custom class that implements Map? Yes that's what I mean. However for the other cases the user has to implement the Map interface which it's quite a lot of work. As the resolve method actually

Re: [lang] text.Interpolation, on to 2.2

2005-06-27 Thread Oliver Heger
by the current lang tests are satisfied. Gary -Original Message- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Saturday, June 25, 2005 7:46 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 I am interested in this topic, too, because I want

RE: [lang] text.Interpolation, on to 2.2

2005-06-27 Thread Gary Gregory
, 2005 1:08 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary, that's right, the basic idea is to configure several VariableResolvers for different purposes. This is pretty much the same as the interpolation engine of [digester] works. Resolvers

Re: [lang] text.Interpolation, on to 2.2

2005-06-27 Thread Oliver Heger
- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 1:08 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary, that's right, the basic idea is to configure several VariableResolvers for different purposes. This is pretty much

RE: [lang] text.Interpolation, on to 2.2

2005-06-27 Thread Gary Gregory
-Original Message- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 10:30 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Hello Gary, I have no strict definition of what I call an interpolation engine, but I view

Re: [lang] text.Interpolation, on to 2.2

2005-06-27 Thread Stephen Colebourne
Oliver Heger wrote: Hello Gary, I have no strict definition of what I call an interpolation engine, but I view it as somewhat that is customizable by clients. I am a little concerned by the direction of this thread. [lang]'s scope doesn't cover the words 'framework' or 'engine'. [lang] is

Re: [lang] text.Interpolation, on to 2.2

2005-06-27 Thread Stephen Colebourne
Gary Gregory wrote: Hello Oliver: I took a quick look at the ticket you linked to below. For this to work for System properties, a simple VariableResolver would do the trick I think. Maybe a generic MapVariableResolver could also be provided and maybe a factory methods in order to say simple

RE: [lang] text.Interpolation, on to 2.2

2005-06-27 Thread Gary Gregory
PROTECTED] Sent: Monday, June 27, 2005 3:36 PM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 Gary Gregory wrote: Hello Oliver: I took a quick look at the ticket you linked to below. For this to work for System properties, a simple VariableResolver would do

RE: [lang] text.Interpolation, on to 2.2

2005-06-26 Thread Gary Gregory
: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Saturday, June 25, 2005 7:46 AM To: Jakarta Commons Developers List Subject: Re: [lang] text.Interpolation, on to 2.2 I am interested in this topic, too, because I want to implement enhanced interpolation suport for [configuration]. I already had

Re: [lang] text.Interpolation, on to 2.2

2005-06-25 Thread Oliver Heger
I am interested in this topic, too, because I want to implement enhanced interpolation suport for [configuration]. I already had a look at the available Interpolation class, but it lacks some features I need. So I wrote something myself which is similar to the interpolation engine of

Re: [lang] text.Interpolation, on to 2.2

2005-06-24 Thread Steven Caswell
Though I don't really have bandwidth to help with it, I am +1 on moving forward with Interpolation being a motivation for the next release. On 6/23/05, Gary Gregory [EMAIL PROTECTED] wrote: Hello: Is anyone planning on working on text.Interpolation in the near future? It seems like a

Re: [lang] text.Interpolation, on to 2.2

2005-06-24 Thread Simon Kitching
I'm willing to do some work on this. I'll need to see what's in lang at the moment though...at least some of the code came originally from Digester so I feel responsible for knocking it into shape for lang! Cheers, Simon On Fri, 2005-06-24 at 06:34 -0400, Steven Caswell wrote: Though I don't

[lang] text.Interpolation, on to 2.2

2005-06-23 Thread Gary Gregory
Hello: Is anyone planning on working on text.Interpolation in the near future? It seems like a logical candidate and a motivation for the next release. Where does the class come from and does it make sense to simply extract some code out of Ant. I could see a subclass dealing specifically with