About Extending Metamodels [message #1726765] |
Wed, 16 March 2016 06:23  |
Eclipse User |
|
|
|
Hello,
I have an existing metamodel. What I want to do is to extend/use this metamodel without touching it. Here are the actions that I want to conduct:
- Adding some attributes to the EClasses in the existing metamodel.
- Adding some new EClasses to the existing metamodel.
As far as I know, there are two possibilities to achieve this: First one is EMF Facet, the second one is EMF Profiling. Question 1: Are there any other alternatives? Question 2: What is the best alternative?
I am not sure which one is the best option. EMF Facet does it dynamically and you don't get a reusable ECore metamodel at the end. I don't know much about EMF profiling.
After this extension/use of the existing metamodel, I wish create instances of the new metamodel. Furthermore, I wish to use these instances in model transformations implemented in ETL. Question 3: Which alternative is supported best by Epsilon/ETL?
Thanks.
|
|
|
|
|
|
|
|
|
|
|
Re: About Extending Metamodels [message #1728270 is a reply to message #1727240] |
Fri, 01 April 2016 09:21   |
Eclipse User |
|
|
|
Hello Dimitris,
I have attached a minimal example project. I hope the names are self explanatory. In any case, some description:
- There are two metamodels: MetamodelA and its extension MetamodelA_Extension.
- There is a metaclass MetaclassA in MetamodelA which has two children metaclasses Sub1 (in MetamodelA) and Sub2 (in MetamodelA_extension).
- I wish to create one model whose root is Root metaclass (in MetamodelA) and still able to include instances of Sub2 in the same model.
I want to mention a few points related to my metamodel creation process, as well (maybe it leads to this problem).
1. To refer to MetamodelA in MetamodelA_Extension, I right-click on the Exeed editor (NOT menu) and choose "Load Resources", then choose "Browse Registered Packages". The registered MetamodelA does not appear in "Development Time Version", but it appears in "Runtime version". When I choose it in the "Runtime version" list, a pop-up window says: "Information: Runtime packages are not displayed in the editor. Reason..." . But I still can't refer to elements in MetamodelA.
2. After the failure in Step 1, I generate Emfatic source from MetamodelA_Extension and manually add the import statement which imports MetamodelA. I have tried two ways. The first way is referring to local metamodel file,
import "platform:/resource/MinimalExampleProject1727226/modified_metamodel/MetamodelA.ecore";
The second way is to refer directly to URL
import "http://www.metamodelAproject.com/metamodelA";
Still no success. I really thank for your time and effort.
[Updated on: Fri, 01 April 2016 09:23] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07259 seconds