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
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
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
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
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
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
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
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
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
-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
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
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
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
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
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
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
-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
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
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
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
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
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
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
-
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
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).
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
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
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
:[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
[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
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 =
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
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
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,
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());
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
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
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
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
, 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
-
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
-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
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
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
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
: 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
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
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
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
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
50 matches
Mail list logo