Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How can I integrate ecore models?
How can I integrate ecore models? [message #1697281] Tue, 02 June 2015 21:55 Go to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hi,

I could fine an ariticle regarding to the model integration.
In that case, it seemed to need each model will be independently developed and one projec will have dependencies. However, my case is more complex.
I would like not only to develop independently, but also to integrate some elements of a model A and some elements of a model B. How should I do in this case?
If someone know this, please let me know.
Thanks.

Regards,
Eunjung Park
Re: How can I integrate ecore models? [message #1697283 is a reply to message #1697281] Tue, 02 June 2015 21:58 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
What do you mean by "integrate"?

On 02/06/2015 11:55 PM, eunjung park wrote:
> Hi,
>
> I could fine an ariticle regarding to the model integration.
> In that case, it seemed to need each model will be independently
> developed and one projec will have dependencies. However, my case is
> more complex.
> I would like not only to develop independently, but also to integrate
> some elements of a model A and some elements of a model B. How should
> I do in this case?
> If someone know this, please let me know.
> Thanks.
>
> Regards,
> Eunjung Park


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can I integrate ecore models? [message #1697285 is a reply to message #1697281] Tue, 02 June 2015 22:31 Go to previous messageGo to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
I tried simple test.
When I tried to generate code from the integrated model, there were some problems in plug-in files. The attached file shows the problems.

[Updated on: Tue, 02 June 2015 22:37]

Report message to a moderator

Re: How can I integrate ecore models? [message #1697286 is a reply to message #1697283] Tue, 02 June 2015 22:35 Go to previous messageGo to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hi Ed Merks,

"Integrate" means gathering elements from multiple ecore models and define in one ecore file.
For example, suppose M1 has E1, E2 and M2 has E3, E4.
I would like to make new M3 which has E1 from M1 and E3 from M2.
Is this possbile?

[Updated on: Tue, 02 June 2015 22:35]

Report message to a moderator

Re: How can I integrate ecore models? [message #1697306 is a reply to message #1697285] Wed, 03 June 2015 05:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
All I see is a file dialog that looks like it's part of a browser. This
seems unrelated...

On 03/06/2015 12:31 AM, eunjung park wrote:
> I tried simple test.
> When I tried to generate code from the integrated model, there were some problems in plug-in files. The attached file shows the problems.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can I integrate ecore models? [message #1697308 is a reply to message #1697286] Wed, 03 June 2015 05:12 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Comments below.

On 03/06/2015 12:35 AM, eunjung park wrote:
> Integrate means gathering elements from multiple ecore models and
> define in one ecore file.
> For example, suppose M1 has E1, E2 and M2 has E3, E4.
By M I assume you mean a model and by E a class. But M "has" E implies
to me that you can an EPackage perhaps called m1 containing an EClass
called E1. EPackages contain EClassifiers, including EClasses, and so
E1 can only be contained by m1.
> I would like to make new M3 which has E1 from M1 and E3 from M2.
You can define a new model M3 that uses things from M1 and M3. You'd use
Load Resource... when editing M3 to load the resources (from the
workspace) for M1 and M2, and then you can use them there. When you
create the GenModel, you should be sure to reuse the GenPackages from
the GenModels for M1 and M2 so you generate new projects containing only
things for M3 and reusing the things it needs from M1 and M2.
> Is this possbile?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can I integrate ecore models? [message #1697334 is a reply to message #1697308] Wed, 03 June 2015 09:05 Go to previous messageGo to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hi Ed,

Thank you for your explanation.
Sorry for incomplete my explanation.
Yes, M1, M2, M3 are model packages, and E1, E2,.. are elements.

"When you
create the GenModel, you should be sure to reuse the GenPackages from
the GenModels for M1 and M2 so you generate new projects containing only
things for M3 and reusing the things it needs from M1 and M2."
How can I inform the EMF that I reuse the GenPacages from existing Models?
Is there any way?

Another thing is that I would like to have one tool which includes all applications of the M1, M2, M3 packages. Is this possible?

Thank you so much.
Best Regards,
Eunjung Park
Re: How can I integrate ecore models? [message #1697337 is a reply to message #1697334] Wed, 03 June 2015 09:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
The wizard has a "Referenced generator models" section. Perhaps
http://ed-merks.blogspot.de/2008/01/creating-children-you-didnt-know.html is
of interest.

On 03/06/2015 11:05 AM, eunjung park wrote:
> Hi Ed,
>
> Thank you for your explanation.
> Sorry for incomplete my explanation.
> Yes, M1, M2, M3 are model packages, and E1, E2,.. are elements.
>
> "When you create the GenModel, you should be sure to reuse the
> GenPackages from the GenModels for M1 and M2 so you generate new
> projects containing only things for M3 and reusing the things it needs
> from M1 and M2."
> How can I inform the EMF that I reuse the GenPacages from existing
> Models?
> Is there any way?
>
> Another thing is that I would like to have one tool which includes all
> applications of the M1, M2, M3 packages. Is this possible?
>
> Thank you so much.
> Best Regards,
> Eunjung Park
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can I integrate ecore models? [message #1697343 is a reply to message #1697337] Wed, 03 June 2015 10:19 Go to previous messageGo to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Thank you for providing the useful informaton.
By the way, I tried to modify the values of "Child Creation Extenders" and "Extensible Provider Factory", but they are not editable in my genmodels.
Could you let me know how to modify the values?
Thanks again,
Eunjung Park
Re: How can I integrate ecore models? [message #1697363 is a reply to message #1697343] Wed, 03 June 2015 12:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
You mean you can't find those properties (on your GenPackage one level
down from the root GenModel) or you can but they are read only (and
you're not trying to edit them via the linked used GenPackage)?

On 03/06/2015 12:19 PM, eunjung park wrote:
> Thank you for providing the useful informaton.
> By the way, I tried to modify the values of "Child Creation Extenders"
> and "Extensible Provider Factory", but they are not editable in my
> genmodels.
> Could you let me know how to modify the values?
> Thanks again,
> Eunjung Park


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can I integrate ecore models? [message #1697393 is a reply to message #1697363] Wed, 03 June 2015 14:56 Go to previous messageGo to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
I could find the attributes but they are read only, so I can't modify them.
Re: How can I integrate ecore models? [message #1697398 is a reply to message #1697393] Wed, 03 June 2015 15:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Are you editing the first GenPackage in the GenModel? The others are
links back to the other GenModels and are not editable.


On 03/06/2015 4:56 PM, eunjung park wrote:
> I could find the attributes but they are read only, so I can't modify
> them.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can I integrate ecore models? [message #1697550 is a reply to message #1697398] Thu, 04 June 2015 19:34 Go to previous messageGo to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hi Ed,

I could find editable attributes.
Thank you so much.
By the way, how about integrating models by using independent project and project dependency?
For example, Model1 is developed by Project1(P1), M2 is developed by Project2(P2).
What I'm thinking is that I make a Integrated model M3 in P3(elements from M1, elements from M2, and newly defined elements) and P3 has dependency on P1 and P2.
I tried to do it and it was successful.
Finally, I want to have P1, P2, P3 in one application.
By the way, is this way reasonable?
Thanks again.

Best Regards,
Eunjung Park
Re: How can I integrate ecore models? [message #1697569 is a reply to message #1697550] Fri, 05 June 2015 05:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Eunjung,

Comments below.

On 04/06/2015 9:35 PM, eunjung park wrote:
> Hi Ed,
>
> I could find editable attributes.
The editors are not so user friendly or obvious, and the Gen* things
have way too many properties, but such is life...
> Thank you so much.
> By the way, how about integrating models by using independent project
> and project dependency?
Yes that's a common scenario.
> For example, Model1 is developed by Project1(P1), M2 is developed by
> Project2(P2).
> What I'm thinking is that I make a Integrated model M3 in P3(elements
> from M1, elements from M2, and newly defined elements) and P3 has
> dependency on P1 and P2.
Yes, that's fine.
> I tried to do it and it was successful.
Of course.
> Finally, I want to have P1, P2, P3 in one application. By the way, is
> this way reasonable?
It's extremely common. In Oomph we use EMF a lot (of course), and have
more than a dozen models, many of them related in much this way, and
then used together in our Eclipse Installer application as well as in a
normal Eclipse IDE application.
> Thanks again.
>
> Best Regards,
> Eunjung Park
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can I integrate ecore models? [message #1697646 is a reply to message #1697569] Fri, 05 June 2015 15:04 Go to previous messageGo to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hi,

Thank you so much.
I have another problem related to integrate models.
I make a new ecore file from existing ecore file and the two ecore files are in the same model directory (i.e. same project).
I used ecore tool which supports to make a ecore model visually.
The problem is that when I tried to generate codes, there were warning, saying that "A plug-in manifest must contain at least one extension or extension point".
Why does this problem occur and How can I solve this problem?
Thank you every time.
Regards,
Eunjung Park
Re: How can I integrate ecore models? [message #1697650 is a reply to message #1697646] Fri, 05 June 2015 15:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Eunjung,

If you have two Ecore Models in the same project (generally avoid that),
they should have a single GenModel or they'll ovewrite each other's
changes (especially for the .edit and .editor projects).

I think the warning you're talking about is that the plugin.xml doesn't
exist, but the model should always generated a plugin.xml, so I'm not
sure why that would go wrong. Is it empty? Does it generate an empty
one if you delete it?

On 05/06/2015 5:04 PM, eunjung park wrote:
> Hi,
>
> Thank you so much.
> I have another problem related to integrate models.
> I make a new ecore file from existing ecore file and the two ecore
> files are in the same model directory (i.e. same project).
> I used ecore tool which supports to make a ecore model visually.
> The problem is that when I tried to generate codes, there were
> warning, saying that "A plug-in manifest must contain at least one
> extension or extension point".
> Why does this problem occur and How can I solve this problem?
> Thank you every time.
> Regards,
> Eunjung Park
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can I integrate ecore models? [message #1697662 is a reply to message #1697650] Fri, 05 June 2015 19:34 Go to previous message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Thanks Ed.
I could find out what is the problem.
The new echo model(M3) which refers to existing model(M1, M2) does not have its own elements, but has referenced elements from M1, M2.
I think that cause a problem.
Any way, thank you so much.

Best Regards,
Eunjung Park
Previous Topic:[CDO] Builing cdo on builserver
Next Topic:Meta Models
Goto Forum:
  


Current Time: Sat Apr 20 13:32:53 GMT 2024

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

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

Back to the top