Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to generate model from meta-model?(Generating Java models from a meta-model)
How to generate model from meta-model? [message #1805163] Tue, 09 April 2019 02:31 Go to next message
John Tipper is currently offline John TipperFriend
Messages: 2
Registered: April 2019
Junior Member
I'm very new to EMF and I have an Ecore meta-model and a large (350k lines of XML) model file, provided by a third-party. I'd like to be able to generate Java classes for the objects described in the model file. What's the best way of doing this please? Is there an example somewhere?

If at all possible, I'd like the generated classes to have no dependencies on any EMF classes.
Re: How to generate model from meta-model? [message #1805388 is a reply to message #1805163] Sat, 13 April 2019 02:38 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
It seems likely that the third party has already generated the code for this. In any case the following tutorial has step-by-step instructions:

https://eclipsesource.com/blogs/tutorials/emf-tutorial/

It's not possible to generate code that does not depend on the EMF runtime, at least not with the EMF code generator. It's possible to generate the model's API such that EMF's APIs are not visible in the generated model's API (via various properties of the GenModel) but EMF's runtime will definitely be used in the model's implementation classes.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:How can I contribute
Next Topic:[XCore] Javadoc style comments?
Goto Forum:
  


Current Time: Fri Apr 26 09:18:03 GMT 2024

Powered by FUDForum. Page generated in 0.03864 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top