One EClass for Two Ecore models [message #1516091] |
Thu, 18 December 2014 11:52  |
Eclipse User |
|
|
|
Hi everyone,
I have two ecore models (M1 and M2) and I want to have the same EClass in both models.
M1 and M2 are in the same project and folder. In M1 I have an EClass called Mapping. The same EClass exists in M2.
Is there a way of "link" Mapping in both models? I need that Eclipse understand that it is the same class. Because when I generate code from M2 after M1 it always overwrite the previous.
thanks
|
|
|
|
|
Re: One EClass for Two Ecore models [message #1517020 is a reply to message #1516221] |
Fri, 19 December 2014 02:42   |
Eclipse User |
|
|
|
Vinicius,
Comments below.
On 18/12/2014 7:50 PM, Vinicius Pereira wrote:
> Hmmm... I did in separated models because in thought it was better to
> understand and have images.
There's nothing wrong with having multiple models, it's just misguided
to "I want the same thing to be in both models".
>
> For example, in a model I show how to map a formal element to an UML
> element using a mapping.
Now sure what you mean by "showing"? Are we really talking about Ecore
models? In Ecore models you define structure, you don't just "show" things.
> In the other model, I show how to create the mapping that I use above.
I don't get this "show how to create" terminology.
>
> In my opinion, two models was better... So I just put everything in
> one model?
That's not what I said. A concept should be defined once and if you
want to reuse it, you should reuse it, not define it a second time and
then "link" it.
|
|
|
|
|
Re: One EClass for Two Ecore models [message #1524847 is a reply to message #1522224] |
Tue, 23 December 2014 13:04  |
Eclipse User |
|
|
|
Jan Reimann wrote on Mon, 22 December 2014 02:17Hi,
Am 18.12.2014 um 19:50 schrieb Vinicius Pereira:
> For example, in a model I show how to map a formal element to an UML
> element using a mapping.
> In the other model, I show how to create the mapping that I use above.
>
> In my opinion, two models was better... So I just put everything in one
> model?
what you really want is one ecore model but several different kinds of
representation of this model. I assume you want to present different
views on the same model. You can definitely do that (e.g. with several
Ecore Diagrams) but the model is the only one, as Ed already said.
cheers,
Jan
Thanks! Exact what I wanted!
Thanks for all replies!
|
|
|
Powered by
FUDForum. Page generated in 0.52962 seconds