Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 146844

Summary: Parsing numbers using edit pattern does not work because of local number format settings
Product: [Modeling] GMF-Tooling Reporter: Missing name <thomas.weiler>
Component: CoreAssignee: gmf.generation-inbox <gmf.generation-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 Keywords: helpwanted
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Missing name CLA 2006-06-13 11:09:10 EDT
Consider the following edit pattern:
{0,number,integer}..{1,number,integer} 

This pattern does not work for local settings like e.g. germany, where "." is used to divide groups of numerics and the "," is used for decimal point (e.g. 1.000,50). With local settings for e.g. USA (numbers are formated like 1,000.50) this pattern works.

See also thread in newsgroup starting at: news://news.eclipse.org:119/e6m2u5$suu$1@utils.eclipse.org
Comment 1 Dmitry Stadnik CLA 2006-09-06 13:28:47 EDT
I fear that there is no simple way to resolve the issue using MessageFormat; I could suggest the following options:

1. Use spaces: {0,number,integer} .. {1,number,integer} instead of {0,number,integer}..{1,number,integer}

2. Write custom code to parse the input string: break it in two parts at value.indexOf("..") and parse these parts as numbers
Comment 2 Dmitry Stadnik CLA 2006-09-06 14:03:50 EDT
3. https://bugs.eclipse.org/bugs/show_bug.cgi?id=156411
Comment 3 Artem Tikhomirov CLA 2007-10-25 13:34:00 EDT
Unlikely to be fixed as it's not GMF's area of interest. Sorry.
Comment 4 Eclipse Webmaster CLA 2010-07-19 22:17:50 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug