Extending a metamodel without overriding it [message #1830579] |
Wed, 29 July 2020 11:29 |
Avi Shaked Messages: 131 Registered: October 2019 |
Senior Member |
|
|
Hi,
I wish to extend an existing metamodel, without changing it or breaking any existing implementations.
I created a new ECORE Modeling project (model B) and add the original metamodel (model A) as a project dependency. Then, I created a new class (class B), and specified one of the classes (class A) in the original metamodel as its supertype.
When I generate code and try to test it (using a run configuration), I see two new models are available: one is a duplication of the original model (model A, now appearing twice), and one is the new model B.
When I create a new model A instance, I am able to create element of type class B (which is good). However, it seems like all model A implementation was duplicated, as I no longer see the original model A icons in the model explorer, and when I use Sirius.
The model is also depicted as ModelA.impl.RootelementImpl@524feab2 (name: null) in the model explorer, and I am unable to view its element unless I open it with Model editor.
Any suggestions how to fix this? Is there a way to extend a metamodel without any replication?
Any suggestions will be much appreciated.
Regards,
Avi
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02834 seconds