Trying to push semantic source of edge to root of model [message #1856449] |
Sat, 10 December 2022 19:24 |
Thomas Chiang Messages: 106 Registered: March 2020 |
Senior Member |
|
|
Hello all,
I'm trying to create edge mappings from a nested element up a level to the current level in my viewpoint. Originally this was easily solved by using the command:
source.eContainer(uml::RootElement)
This command would push ownership of the edge to the root element of the model, problem solved
However my metamodel has since evolved to have a new element that inherits from uml::RootElement to allow for hierarchical viewpoints throughout my models. We'll call the new class uml::ElementContainer.
My problem is that ElementContainer inherits from RootElement and according to the acceleo documentation the command eContainer(model::EClass) will return the first instance of given of the parameter, including subtypes. As a result, when I use this command it no longer pushes my edge ownership up a level, instead it returns the owner as the nested element. This is a problem as while it is semantically correct, it doesn't appear in the correct syntactic location. Any recommendations for a command to fix this? If this should be posted in a different location let me know as well and I will post it there.
Regards,
Tom
|
|
|
Powered by
FUDForum. Page generated in 0.04925 seconds