diff options
author | glefur | 2012-02-08 10:44:29 +0000 |
---|---|---|
committer | glefur | 2012-02-08 10:44:29 +0000 |
commit | c2f2ac15bb711b10444e0e2e1c7a0acd7999d204 (patch) | |
tree | d67d6e67c29be6a80c8f47d6c6af44bb9fe61022 | |
parent | f758161092d775942a6e167cd505f9505cdf74c9 (diff) | |
download | org.eclipse.eef-c2f2ac15bb711b10444e0e2e1c7a0acd7999d204.tar.gz org.eclipse.eef-c2f2ac15bb711b10444e0e2e1c7a0acd7999d204.tar.xz org.eclipse.eef-c2f2ac15bb711b10444e0e2e1c7a0acd7999d204.zip |
FIXED: NPE on optional Integer
-rw-r--r-- | plugins/org.eclipse.emf.eef.codegen/src/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.eef.codegen/src/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl b/plugins/org.eclipse.emf.eef.codegen/src/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl index fbd44d57e..f4bc27930 100644 --- a/plugins/org.eclipse.emf.eef.codegen/src/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl +++ b/plugins/org.eclipse.emf.eef.codegen/src/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl @@ -42,6 +42,7 @@ import org.eclipse.emf.edit.command.MoveCommand; import org.eclipse.emf.ecore.EcorePackage; import [pec.model.qualifiedName(basePackage)/]; import org.eclipse.emf.eef.runtime.EEFRuntimePlugin; +import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; [comment add import for external ViewReference (stored in another resource)/] [view.manageImportForViewReferences(pec, basePackage)/] [comment add import for ViewReference/] @@ -75,7 +76,6 @@ import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.util.Diagnostician; import org.eclipse.emf.ecore.util.EContentAdapter; -import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.common.util.WrappedException; [if (pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement).views->select(representation.name = 'TableComposition' or representation.name = 'AdvancedTableComposition')->notEmpty())] import org.eclipse.emf.ecore.EStructuralFeature; @@ -362,7 +362,7 @@ public class [pec.subPECClass(view)/] extends [pec.pecComponentSuperClass()/] { Object newValue = event.getNewValue(); [if (editionElement.model.eType.instanceClassName <> 'String')] if (newValue instanceof String) { - newValue = EcoreUtil.createFromString([editionElement.metamodelGetter()/].getEAttributeType(), (String)newValue); + newValue = EEFConverterUtil.createFromString([editionElement.metamodelGetter()/].getEAttributeType(), (String)newValue); } [/if] ret = Diagnostician.INSTANCE.validate([editionElement.metamodelGetter()/].getEAttributeType(), newValue); @@ -382,7 +382,7 @@ public class [pec.subPECClass(view)/] extends [pec.pecComponentSuperClass()/] { [else] Object newValue = event.getNewValue(); if (newValue instanceof String) { - newValue = EcoreUtil.createFromString([editionElement.metamodelGetter()/].getEAttributeType(), (String)newValue); + newValue = EEFConverterUtil.createFromString([editionElement.metamodelGetter()/].getEAttributeType(), (String)newValue); } ret = Diagnostician.INSTANCE.validate([editionElement.metamodelGetter()/].getEAttributeType(), newValue); [/if] |