Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java')
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java
index cca150afe35..2ed4577eafa 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java
@@ -9,10 +9,15 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 402525
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 455783
*
*****************************************************************************/
package org.eclipse.papyrus.uml.nattable.config;
+import static org.eclipse.nebula.widgets.nattable.util.ObjectUtils.isNotNull;
+
+import java.math.BigDecimal;
+
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -427,7 +432,25 @@ public class UMLFeatureCellEditorConfig extends EStructuralFeatureEditorConfig {
IDisplayConverter converter = null;
switch (editorKind) {
case SINGLE_REAL:
- converter = new DefaultDoubleDisplayConverter();
+ converter = new DefaultDoubleDisplayConverter(){
+
+ @Override
+ public Object canonicalToDisplayValue(Object canonicalValue) {
+ // Bug 455783 :
+ // Redefine this method to manage the display of double number with dot and not with comma
+ if (isNotNull(canonicalValue)) {
+ return canonicalValue;
+ }
+ return null;
+ }
+
+ @Override
+ protected Object convertToNumericValue(String value) {
+ // Bug 455783 :
+ // Redefine this method to manage the conversion to double value with the dot and not the comma
+ return new BigDecimal(value).doubleValue();
+ }
+ };
break;
case SINGLE_UML_REFERENCE:
converter = new DisplayConverter() {

Back to the top