Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » Accessing external meta-models and code generation
Accessing external meta-models and code generation [message #1599563] Tue, 03 February 2015 18:34 Go to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 392
Registered: March 2011
Senior Member
If I have a (meta)model M1 that needs references to elements from another (meta)model M0, defined in a separate modelling project, I can import M0 in M1 by adding M0 to the Project dependencies of M1. However, when I generate code from the genmodel of M1, this generates the code for M0 as well, inside the src folder of M1. This pretty much defeats the purpose of reusable models, yielding duplicate code (the code for M0 is now in two places: M0/src and M1/src). Is there a way to generate code for M1 so that it refers to the already generated code for M0 in its own project? Without this ability, as soon as we have a couple of models depending on others, we get into a maintenance nightmare.


I'm using

Ecore Diagram Editor Eclipse Modeling Project


Eclipse Modeling Tools epp.package.modeling null


Eclipse Modeling Tools

Version: Luna Service Release 1a (4.4.1)
Build id: 20150109-0600
Re: Accessing external meta-models and code generation [message #1705784 is a reply to message #1599563] Wed, 19 August 2015 07:55 Go to previous message
Thomas Lieser is currently offline Thomas LieserFriend
Messages: 1
Registered: August 2015
Junior Member
I'm myself quite new to this. But the solution (to me) was to "reload the genmodel" and specify what your root package and your referenced packages are (you Need to include ecore and genmodel in the dependencies).

see pic for better explanation
Previous Topic:Error loading representations file in Mars (regression?)
Next Topic:Opening .ecorediagram diagrams in Luna??
Goto Forum:

Current Time: Wed Nov 25 12:06:18 GMT 2020

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

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

Back to the top