Assigning values to a Map owned by a target element [message #1860807] |
Mon, 04 September 2023 08:14 |
Yves BERNARD Messages: 146 Registered: July 2014 |
Senior Member |
|
|
I'm trying to get a transformation that can create EAnnotation. For that purpose, I wrote the following called rule:
rule createEAnnotation(source: String, key: String, value: String) {
to
tgt: ECORE!EAnnotation (
source <- source
,details <- Map{(key, value)}
)
}
But at runtime, calling this rule generates the following exception:
org.eclipse.m2m.atl.emftvm.util.VMException: java.lang.IllegalArgumentException: Cannot assign Map{'derivation'='-- some OCL code'} to multi-valued field EAnnotation::details
However the eCore javadoc actually says that this attribute is typed by EMap<java.lang.String,java.lang.String>
What is wrong?
Yves
[Updated on: Mon, 04 September 2023 12:51] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02147 seconds