| Summary: | Patch for correct parsing of integer attributes in editing | ||
|---|---|---|---|
| Product: | [Modeling] GMF-Tooling | Reporter: | Axel Guckelsberger <info> |
| Component: | Core | Assignee: | Project Inbox <gmp.gmf-tooling-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Note: this does not work with native parser (yet), as there is no editorProcessor(?). |
Build Identifier: 20100617-1415 This patch fixes the bug that an integer feature with a value greater than 999 is displayed with a thousand separator preventing a successful editing. 1. templates/parsers/PredefinedParser.xpt Change protected java.text.MessageFormat getEditorProcessor() { to public java.text.MessageFormat getEditorProcessor() { 2. templates/impl/parsers/ParserProvider.xpt Change «parserFieldName(element)» = parser; } return «parserFieldName(element)»; to «parserFieldName(element)» = parser; final java.text.DecimalFormat df = new java.text.DecimalFormat(); df.setMaximumFractionDigits(0); df.setGroupingUsed(false); for (int i = 0; i < features.length; i++) { EAttribute eAttribute = features[i]; if (eAttribute.getEType().getName().equals("EInt")) { parser.getEditorProcessor().setFormatByArgumentIndex(i, df); } } } return «parserFieldName(element)»; Regards, Axel Reproducible: Always