[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2008-02-27 Thread Niall Pemberton (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niall Pemberton updated LANG-362:
-

Attachment: ExtendedMessageFormatTest.java

Attaching a test case for ExtendedMessageFormat that I think should replace the 
existing four test classes.

Note this includes a couple of tests for custom sub-formats which currently 
fail.

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Fix For: 2.4
>
> Attachments: DateFormatFactory.java, extendedMessageFormat.patch.txt, 
> extendedMessageFormat.patch.txt, ExtendedMessageFormat2.java, 
> ExtendedMessageFormatTest.java, FormatFactory.java
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2008-01-30 Thread Niall Pemberton (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niall Pemberton updated LANG-362:
-

Attachment: DateFormatFactory.java
FormatFactory.java
ExtendedMessageFormat2.java

OK I'm attaching the following implementations

 - ExtendedMessageFormat2
 - FormatFactory
 - DateFormatFactory

The DateFormatFactory is an example FormatFactory implementation that supports 
the existing "date" and "time" format types, but also adds a new "datetime" 
type. (btw its written as it is so that it can be used to implement Lang's 
FastDateFormat implementation - by just overriding the protected methods).

So to use the new "datetime" type, all thats required is the following:

Map registry = new HashMap();
registry.put("datetime", new DateFormatFactory());

String pattern = "Date: {0,date,short} Time: {0,time,medium} Date/Time: 
{0,datetime,long}";
ExtendedMessageFormat2 fmt = new ExtendedMessageFormat2(pattern, 
registry);

System.out.println(fmt.format(new Object[] {new Date()}));

Note that the "date" and "time" types are not being handled by our custom 
factory - the standard MessageFormat functionality is doing that. If we wanted 
we could register custom formats for those standard types as well.

Maybe I'm missing something, but is this not achieving the same goal?

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Fix For: 2.4
>
> Attachments: DateFormatFactory.java, extendedMessageFormat.patch.txt, 
> extendedMessageFormat.patch.txt, ExtendedMessageFormat2.java, 
> FormatFactory.java
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2007-10-26 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated LANG-362:
-

Attachment: extendedMessageFormat.patch.txt

move MultiFormat to LANG-366

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Fix For: 2.4
>
> Attachments: extendedMessageFormat.patch.txt, 
> extendedMessageFormat.patch.txt, extendedMessageFormat.patch.txt
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2007-10-26 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated LANG-362:
-

Attachment: (was: extendedMessageFormat.patch.txt)

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Fix For: 2.4
>
> Attachments: extendedMessageFormat.patch.txt, 
> extendedMessageFormat.patch.txt
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2007-10-26 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated LANG-362:
-

Attachment: extendedMessageFormat.patch.txt

Remove MetaFormat interface; make DefaultMetaFormatFactory package-private, 
delegate new static methods on ExtendedMessageFormat to it; add metaFormat 
settor to ExtendedMF to complement applyPattern() which can be called "later"; 
renamed AbstractMetaFormat to MetaFormatSupport; renamed AbstractDateMetaFormat 
to DateMetaFormatSupport (yes, a nod to Spring); made sure all inherited 
javadoc has something to inherit (I think).

The packaging issue is outstanding, but since I removed an interface and made 
one class visible only inside its package, the impact of leaving this stuff in 
oacl.text is less severe; ultimately I don't really care whether they go in 
text or text.format however.

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Fix For: 2.4
>
> Attachments: extendedMessageFormat.patch.txt, 
> extendedMessageFormat.patch.txt
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2007-10-24 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated LANG-362:
-

Attachment: extendedMessageFormat.patch.txt

updated from original patch to remove unnecessary constructors and make sure 
all ws is consumed at end of format element.

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Fix For: 2.4
>
> Attachments: extendedMessageFormat.patch.txt
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2007-10-24 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated LANG-362:
-

Attachment: (was: extendedMessageFormat.patch.txt)

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Fix For: 2.4
>
> Attachments: extendedMessageFormat.patch.txt
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2007-10-22 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated LANG-362:
-

Fix Version/s: 2.4

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Fix For: 2.4
>
> Attachments: extendedMessageFormat.patch.txt
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2007-10-22 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated LANG-362:
-

Description: Discussed on dev@ ( 
http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
PROTECTED] ); adding here for tracking purposes and in case anyone has any 
serious objections to my implementation.  Patch forthcoming...  (was: Discussed 
on dev@; adding here for tracking purposes and in case anyone has any serious 
objections to my implementation.  Patch forthcoming...)

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Attachments: extendedMessageFormat.patch.txt
>
>
> Discussed on dev@ ( 
> http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/[EMAIL 
> PROTECTED] ); adding here for tracking purposes and in case anyone has any 
> serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

2007-10-22 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated LANG-362:
-

Attachment: extendedMessageFormat.patch.txt

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> -
>
> Key: LANG-362
> URL: https://issues.apache.org/jira/browse/LANG-362
> Project: Commons Lang
>  Issue Type: New Feature
>Reporter: Matt Benson
>Assignee: Matt Benson
>Priority: Minor
> Attachments: extendedMessageFormat.patch.txt
>
>
> Discussed on dev@; adding here for tracking purposes and in case anyone has 
> any serious objections to my implementation.  Patch forthcoming...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.