|Do I need to generate the code of the meta model to explore/edit existing models [message #1811226]
||Thu, 29 August 2019 07:07
| Afe Fer
Registered: August 2019
This is more an academic/theoretical question.
Here is a scenario :
I want to devellop a tool (maybe a plugin) that edits models generated by other tools.
I dont know the exact meta model but I have the ecore file.
My tool does not need to generate any code. Just explore/edit models with respect to the ecore file.
In theory, I have all the necessaty elements I need to do this directly from the xmi file. right?
So I can imagine that there is already an API that takes the ecore file and generates a sort of parser for its models and I would (just) implement my tool to work directly with the xmi file.
Is there a such EMF API? (of course I dont want to explore the models files like xmi files)
Is it better to generate the code first and why? Because for me it seems like something complex because I have to save the generated code somewhere in my disk, import the packages dynamicaly, and use the reflective API to create every single object in the model and use reflection again to inspect it.
If you have any pointers to existing code that implemenst either solution, let me know please.
Thank you in advance
Powered by FUDForum
. Page generated in 0.01931 seconds