diff options
author | 2018-11-07 12:50:02 +0100 | |
---|---|---|
committer | 2018-11-07 12:50:02 +0100 | |
commit | ebb8785ae0af45e5a18eed892db641ce5b35ce6b (patch) | |
tree | 3fccd2ca909b20e73ea4eb33f31508eddca5e117 | |
parent | Logic structure builder fix for string building (diff) | |
download | VIATRA-Generator-ebb8785ae0af45e5a18eed892db641ce5b35ce6b.tar.gz VIATRA-Generator-ebb8785ae0af45e5a18eed892db641ce5b35ce6b.tar.zst VIATRA-Generator-ebb8785ae0af45e5a18eed892db641ce5b35ce6b.zip |
Fixed xmi generation with attributes. Added better error messages.
2 files changed, 6 insertions, 2 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.ecore2logic/src/hu/bme/mit/inf/dslreasoner/ecore2logic/AttributeMapper.xtend b/Framework/hu.bme.mit.inf.dslreasoner.ecore2logic/src/hu/bme/mit/inf/dslreasoner/ecore2logic/AttributeMapper.xtend index 95be8433..b2f4867b 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.ecore2logic/src/hu/bme/mit/inf/dslreasoner/ecore2logic/AttributeMapper.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.ecore2logic/src/hu/bme/mit/inf/dslreasoner/ecore2logic/AttributeMapper.xtend | |||
@@ -112,7 +112,7 @@ class EAttributeMapper_RelationsOverTypes implements EAttributeMapper { | |||
112 | else if(attribute.EType.name.equals("EDouble") || | 112 | else if(attribute.EType.name.equals("EDouble") || |
113 | attribute.EType.name.equals("EFloat")) return LogicReal | 113 | attribute.EType.name.equals("EFloat")) return LogicReal |
114 | else if(attribute.EType.name.equals("EString")) return LogicString | 114 | else if(attribute.EType.name.equals("EString")) return LogicString |
115 | else throw new UnsupportedOperationException('''Unsupported attribute type: «attribute.EType.name»''') | 115 | else throw new UnsupportedOperationException('''Unsupported attribute type: «attribute.EType.name» of «attribute.EContainingClass.EPackage»::«attribute.EContainingClass.name».«attribute.name»''') |
116 | } | 116 | } |
117 | 117 | ||
118 | override relationOfAttribute(Ecore2Logic_Trace trace, EAttribute attribute) { | 118 | override relationOfAttribute(Ecore2Logic_Trace trace, EAttribute attribute) { |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic2ecore/src/hu/bme/mit/inf/dslreasoner/logic2ecore/Logic2Ecore.xtend b/Framework/hu.bme.mit.inf.dslreasoner.logic2ecore/src/hu/bme/mit/inf/dslreasoner/logic2ecore/Logic2Ecore.xtend index c7e14362..92deeae6 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic2ecore/src/hu/bme/mit/inf/dslreasoner/logic2ecore/Logic2Ecore.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic2ecore/src/hu/bme/mit/inf/dslreasoner/logic2ecore/Logic2Ecore.xtend | |||
@@ -91,7 +91,11 @@ class Logic2Ecore { | |||
91 | val list = sourceObject.eGet(attributeType) as List<? super Object> | 91 | val list = sourceObject.eGet(attributeType) as List<? super Object> |
92 | list += l.key | 92 | list += l.key |
93 | } else { | 93 | } else { |
94 | sourceObject.eSet(attributeType,l) | 94 | try { |
95 | sourceObject.eSet(attributeType,l.key) | ||
96 | } catch(Exception e) { | ||
97 | e.printStackTrace | ||
98 | } | ||
95 | } | 99 | } |
96 | } | 100 | } |
97 | } | 101 | } |