That's why I brought it up, just wanted that feature for as cheap as possible. :)
I know some work has been done on a JDK 5 lang; if we add new stuff to 2.3I'd like it to be as easy as possible to integrate into whatever comes out of the 5 effort. On 10/5/07, Matt Benson <[EMAIL PROTECTED]> wrote: > > > --- James Carman <[EMAIL PROTECTED]> wrote: > > > Ok, cool. I don't really like global stuff like > > that either. But, > > some libraries (beanutils for one) do that kind of > > stuff. I like the > > idea of having your own instances of this and I like > > the idea of the > > feature. Very cool! Also, the varargs feature > > would be very nice. > > They've already made MessageFormat use varargs in > > 1.5, so it would > > fit. > > Doh--I hadn't noticed that. That being the case, we > should inherit it for free if ExtendedMessageFormat > does what it says and extends MessageFormat. :) So > this wouldn't require Lang moving to JDK5 just for > this. > > -Matt > > > > > On 10/5/07, Matt Benson <[EMAIL PROTECTED]> > > wrote: > > > > > > --- James Carman <[EMAIL PROTECTED]> > > wrote: > > > > > > > You mean this extension would allow some sort of > > > > "registry" which is > > > > keyed by the second argument of the format > > > > expression? So, I could do > > > > something like... > > > > > > > > ExtendedMessageFormat fmt = new > > > > ExtendedMessageFormat(); > > > > fmt.addFormatHandler("foo", new MyFooHandler() > > ); > > > > String str = fmt.format("Hello, {0,foo}!", > > "James > > > > Carman"); > > > > > > > > Now maybe you'd register the "handler" globally, > > but > > > > you get the idea. > > > > > > That's essentially the effect I want to achieve. > > As > > > for global blah, I am more interested in doing > > things > > > on a POJO basis; I think there are plenty of > > solutions > > > out there anymore that would allow a user to > > automate > > > the config for multiple instances that there's no > > > percentage in resorting to weird tricks to get all > > > instances of the proposed ExtendedMessageFormat to > > use > > > the same custom delegate formats. > > > > > > -Matt > > > > > > > > > > > On 10/5/07, Matt Benson <[EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > > --- Henri Yandell <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > Out of interest; related to a JIRA issue? > > > > > > > > > > > > > > > > Actually no. I guess I'll go ahead and lay my > > > > cards > > > > > on the table in case anyone has any wisdom for > > me. > > > > An > > > > > obviously missing piece of > > java.text.MessageFormat > > > > is > > > > > the ability to plug in other custom > > formatters. > > > > I've > > > > > only seen one OSS project (msg at java.net) > > that > > > > > addresses this, and it has a dubious > > configuration > > > > > mechanism (magic XML classpath resource) and > > an > > > > IMHO > > > > > useless inheritance hierarchy i.e. > > > > > java.lang.Object--the project claims its > > > > > XMessageFormat is a "drop-in replacement" but > > > > > apparently their idea of drop-in differs from > > > > mine. > > > > > IMO such a solutiion would necessarily need to > > > > extend > > > > > Format and very likely MessageFormat as well; > > a > > > > Format > > > > > implicitly understood to operate upon Object[] > > is > > > > good > > > > > enough from a javadoc POV but I have the > > feeling > > > > that > > > > > much existing code would cope better with a > > > > > MessageFormat subclass. For these reasons I > > > > assert > > > > > that I am not just indulging in NIH. Lang > > already > > > > > provides the CompositeFormat in > > o.a.c.lang.text; > > > > this > > > > > constitutes IMO a precedent for custom Formats > > to > > > > live > > > > > in Lang. It is my intent to create > > > > > o.a.c.lang.text.ExtendedMessageFormat (extends > > > > > java.text.MessageFormat) with a pluggable > > means of > > > > > resolving delegate formatters (optionally) > > > > specified > > > > > with each "format element". My intent is to > > > > provide a > > > > > subclass whose default behavior is identical > > to > > > > its > > > > > parent class but provides extensibility for > > > > plugging > > > > > in custom formats. > > > > > > > > > > Comments? > > > > > > > > > > -Matt > > > > > > > > > > > On 10/4/07, Matt Benson > > <[EMAIL PROTECTED]> > > > > > > wrote: > > > > > > > in org.apache.commons.lang.text > > > > > > > > > > > > > > -Matt > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > > > > > Pinpoint customers who are looking for > > what > > > > you > > > > > > sell. > > > > > > > http://searchmarketing.yahoo.com/ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > To unsubscribe, e-mail: > > > > > > [EMAIL PROTECTED] > > > > > > > For additional commands, e-mail: > > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: > > > > > > [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: > > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > > > Looking for a deal? Find great prices on > > flights > > > > and hotels with Yahoo! FareChase. > > > > > http://farechase.yahoo.com/ > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: > > > > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > Be a better Globetrotter. Get better travel > > answers from someone who knows. Yahoo! Answers - > > Check it out. > > > > > > http://answers.yahoo.com/dir/?link=list&sid=396545469 > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > ____________________________________________________________________________________ > Shape Yahoo! in your own image. Join our Network Research Panel today! > http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >