| 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: | Core | Assignee: | 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: | |||
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
Unlikely to be fixed as it's not GMF's area of interest. Sorry. [GMF Restructure] Bug 319140 : product GMF and component Generation was the original product and component for this bug |
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