|
|
Re: Assignment rules and EOperations [message #882593 is a reply to message #882142] |
Wed, 06 June 2012 20:05 |
|
I have an Ecore model that I cannot change its structure (it is based on UML specification). Among other things, it has some OCL constraints that demand to set two associations with the same values (one of them is a containment association).
Hence my DSL is something like:
Association:
'association'
ownedEnd+=Property
memberEnd+=[Property]
;
I'm trying to find a way to simplify this syntax using one EOperation that makes this "two-step" association. My goal is to have a syntax like this:
Association returns dsl::DslAssociation: //DslAssociation is a subclass of Association
'association'
myOperation+=Property
;
I tried to use an EMF Adapter to add new items from ownedEnd to memberEnd.
It worked with a plain Java example (and also worked when I created a model in the Sample Reflexive Ecore Model Editor) but it didnt work with Xtext (it looks like the Xtext's deserialization explicitly sets the memberEnd's value to an empty list after the adapter changed it to reflect changes in ownedEnd's value.
Thank you
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04217 seconds