Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EcoreTools] Multiple packages(Multiple packages in one ecore file)
[EcoreTools] Multiple packages [message #491732] Thu, 15 October 2009 15:34 Go to next message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Hi,

I'm new to Ecore Tools. I need to create three different packages (actually complete metamodels) inside one ecore file. How can i do this with Ecore Tools?


--
thx in advance, Milan
Re: [EcoreTools] Multiple packages [message #491764 is a reply to message #491732] Thu, 15 October 2009 17:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Milan,

I can't imagine why you'd need to create three packages in one Ecore
file. Personally I'd suggest that's a bad idea. One package per file
seems better. Certainly one root package per file is pretty much
necessary, so you could create one root package with three subpackages,
but again, I'd advise against that. Perhaps you should explain why you
consider this a need?


Milan Milanovich wrote:
> Hi,
>
> I'm new to Ecore Tools. I need to create three different packages
> (actually complete metamodels) inside one ecore file. How can i do
> this with Ecore Tools?
>
>
> --
> thx in advance, Milan


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EcoreTools] Multiple packages [message #491775 is a reply to message #491764] Thu, 15 October 2009 18:36 Go to previous messageGo to next message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Dear Ed,

thank you on answer.

I need three packages in one file, because I have two languages and their metamodels (let say UML and BPMN), and I want to create the third language by using concepts from both languages (some hybrid of these two). Then, I need to generate GMF app from this (one) ecore file.

Is this good solution?

--
thx, Milan



Ed Merks wrote on Thu, 15 October 2009 13:25
Milan,

I can't imagine why you'd need to create three packages in one Ecore
file. Personally I'd suggest that's a bad idea. One package per file
seems better. Certainly one root package per file is pretty much
necessary, so you could create one root package with three subpackages,
but again, I'd advise against that. Perhaps you should explain why you
consider this a need?


Milan Milanovich wrote:
> Hi,
>
> I'm new to Ecore Tools. I need to create three different packages
> (actually complete metamodels) inside one ecore file. How can i do
> this with Ecore Tools?
>
>
> --
> thx in advance, Milan

Re: [EcoreTools] Multiple packages [message #491793 is a reply to message #491775] Thu, 15 October 2009 20:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Milan,

Comments below.

Milan Milanovich wrote:
> Dear Ed,
>
> thank you on answer.
>
> I need three packages in one file, because I have two languages and
> their metamodels (let say UML and BPMN), and I want to create the
> third language by using concepts from both languages (some hybrid of
> these two). Then, I need to generate GMF app from this (one) ecore file.
The need for three Ecore models, i.e., three EPackages, in no way
implies a need for three models in one file, regardless of how these
three models might be related to each other.
>
> Is this good solution?
It sounds like you're focus on the wrong detail. You can have three
package is three different files and those packages can be related in
any arbitrary way...
>
> --
> thx, Milan
>
>
>
> Ed Merks wrote on Thu, 15 October 2009 13:25
>> Milan,
>>
>> I can't imagine why you'd need to create three packages in one Ecore
>> file. Personally I'd suggest that's a bad idea. One package per
>> file seems better. Certainly one root package per file is pretty
>> much necessary, so you could create one root package with three
>> subpackages, but again, I'd advise against that. Perhaps you should
>> explain why you consider this a need?
>>
>>
>> Milan Milanovich wrote:
>> > Hi,
>> >
>> > I'm new to Ecore Tools. I need to create three different packages >
>> (actually complete metamodels) inside one ecore file. How can i do >
>> this with Ecore Tools?
>> >
>> >
>> > -- > thx in advance, Milan
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EcoreTools] Multiple packages [message #491808 is a reply to message #491793] Thu, 15 October 2009 22:27 Go to previous messageGo to next message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Dear Ed,

sorry on my bad EMF knowledge. That would be better solution for me. So, I can connect a model elements in one ecore file to model elements in another file? And also, to show all of these elements in one ecore diagram (as i want to define it in this way), and later to generate GMF app from this?

--
Thx, Milan
Re: [EcoreTools] Multiple packages [message #491829 is a reply to message #491808] Fri, 16 October 2009 04:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030403090803000808060903
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Milan,

Comments below.

Milan Milanovich wrote:
> Dear Ed,
>
> sorry on my bad EMF knowledge.
No problem.
> That would be better solution for me. So, I can connect a model
> elements in one ecore file to model elements in another file?
Absolutely. This tutorial will help you understand a little better maybe:

Tutorial: Generating an Extended EMF Model
< http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/slibmod/slibmod.html>

> And also, to show all of these elements in one ecore diagram (as i
> want to define it in this way),
Yes, you drag and drop things from the outline onto the canvas. And
there's a Load Resource... action for loading in other Ecore models so
you can refer to them and display them.
> and later to generate GMF app from this?
Yes, the above tutorial will help prepare the EMF GenModel you'll need.
Note that if you have mutually dependent Ecore models, they'll need to
be contained by a single GenModel. For one way dependencies, you can
put them in separate GenModels as in the tutorial above.
>
> --
> Thx, Milan

--------------030403090803000808060903
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Milan,<br>
<br>
Comments below.<br>
<br>
Milan Milanovich wrote:
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite">Dear
Ed,
<br>
<br>
sorry on my bad EMF knowledge. </blockquote>
No problem.<br>
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite">That
would be better solution for me. So, I can connect a model elements in
one ecore file to model elements in another file? </blockquote>
Absolutely. This tutorial will help you understand a little better
maybe:<br>
<blockquote><a
href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/slibmod/slibmod.html">Tutorial:
Generating an Extended EMF Model</a></blockquote>
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite">And
also, to show all of these elements in one ecore diagram (as i want to
define it in this way), </blockquote>
Yes, you drag and drop things from the outline onto the canvas.  And
there's a Load Resource... action for loading in other Ecore models so
you can refer to them and display them.<br>
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite">and
later to generate GMF app from this?
<br>
</blockquote>
Yes, the above tutorial will help prepare the EMF GenModel you'll
need.  Note that if you have mutually dependent Ecore models, they'll
need to be contained by a single GenModel.  For one way dependencies,
you can put them in separate GenModels as in the tutorial above.<br>
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite"><br>
--
<br>
Thx, Milan
<br>
</blockquote>
</body>
</html>

--------------030403090803000808060903--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EcoreTools] Multiple packages [message #491871 is a reply to message #491829] Fri, 16 October 2009 10:02 Go to previous messageGo to next message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Dear Ed,

thank you on answer.

Ed Merks wrote on Fri, 16 October 2009 00:54


Milan Milanovich wrote:
> Dear Ed,
>
> sorry on my bad EMF knowledge.
No problem.
> That would be better solution for me. So, I can connect a model
> elements in one ecore file to model elements in another file?
Absolutely. This tutorial will help you understand a little better maybe:

Tutorial: Generating an Extended EMF Model
< http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/slibmod/slibmod.html>



Yes, I read this tutorial already, but obviously I missed this part with split files.

Ed Merks wrote on Fri, 16 October 2009 00:54

> And also, to show all of these elements in one ecore diagram (as i
> want to define it in this way),
Yes, you drag and drop things from the outline onto the canvas. And
there's a Load Resource... action for loading in other Ecore models so
you can refer to them and display them.
> and later to generate GMF app from this?
Yes, the above tutorial will help prepare the EMF GenModel you'll need.
Note that if you have mutually dependent Ecore models, they'll need to
be contained by a single GenModel. For one way dependencies, you can
put them in separate GenModels as in the tutorial above.



Can you tell me ho to make single GenModel from multiple mutually dependant Ecore models?

--
Best regards, Milan
Re: [EcoreTools] Multiple packages [message #491899 is a reply to message #491871] Fri, 16 October 2009 13:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070809040303060101000909
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Milan,

Comments below.

Milan Milanovich wrote:
> Dear Ed,
> thank you on answer.
>
> Ed Merks wrote on Fri, 16 October 2009 00:54
>> Milan Milanovich wrote:
>> > Dear Ed,
>> >
>> > sorry on my bad EMF knowledge. No problem.
>> > That would be better solution for me. So, I can connect a model >
>> elements in one ecore file to model elements in another file?
>> Absolutely. This tutorial will help you understand a little better
>> maybe:
>>
>> Tutorial: Generating an Extended EMF Model
>> < http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips
>> e.emf.doc/tutorials/slibmod/slibmod.html>
>
>
> Yes, I read this tutorial already, but obviously I missed this part
> with split files.
>
> Ed Merks wrote on Fri, 16 October 2009 00:54
>> > And also, to show all of these elements in one ecore diagram (as i
>> > want to define it in this way), Yes, you drag and drop things from
>> the outline onto the canvas. And there's a Load Resource... action
>> for loading in other Ecore models so you can refer to them and
>> display them.
>> > and later to generate GMF app from this?
>> Yes, the above tutorial will help prepare the EMF GenModel you'll
>> need. Note that if you have mutually dependent Ecore models, they'll
>> need to be contained by a single GenModel. For one way dependencies,
>> you can put them in separate GenModels as in the tutorial above.
>
>
> Can you tell me ho to make single GenModel from multiple mutually
> dependant Ecore models?
You'll find you're unable *not *to do this. No matter which model you
load first, EMF will load all the ones it depends on and will force you
to create a GenModel for them all, or to locate an existing GenModel.
>
> --
> Best regards, Milan
>

--------------070809040303060101000909
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Milan,<br>
<br>
Comments below.<br>
<br>
Milan Milanovich wrote:
<blockquote cite="mid:hb9gcl$97u$1@build.eclipse.org" type="cite">Dear
Ed, <br>
thank you on answer.
<br>
<br>
Ed Merks wrote on Fri, 16 October 2009 00:54
<br>
<blockquote type="cite">Milan Milanovich wrote:
<br>
&gt; Dear Ed,
<br>
&gt;
<br>
&gt; sorry on my bad EMF knowledge. No problem.
<br>
&gt; That would be better solution for me. So, I can connect a model
&gt; elements in one ecore file to model elements in another file?
Absolutely. This tutorial will help you understand a little better
maybe:
<br>
<br>
    Tutorial: Generating an Extended EMF Model
<br>
    &lt;  <a class="moz-txt-link-freetext" href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips"> http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips</a>
e.emf.doc/tutorials/slibmod/slibmod.html&gt;
<br>
</blockquote>
<br>
<br>
Yes, I read this tutorial already, but obviously I missed this part
with split files.
<br>
<br>
Ed Merks wrote on Fri, 16 October 2009 00:54
<br>
<blockquote type="cite">&gt; And also, to show all of these elements
in one ecore diagram (as i &gt; want to define it in this way), Yes,
you drag and drop things from the outline onto the canvas.  And there's
a Load Resource... action for loading in other Ecore models so you can
refer to them and display them.
<br>
&gt; and later to generate GMF app from this?
<br>
Yes, the above tutorial will help prepare the EMF GenModel you'll
need.  Note that if you have mutually dependent Ecore models, they'll
need to be contained by a single GenModel.  For one way dependencies,
you can put them in separate GenModels as in the tutorial above.
<br>
</blockquote>
<br>
<br>
Can you tell me ho to make single GenModel from multiple mutually
dependant Ecore models?
<br>
</blockquote>
You'll find you're unable <b>not </b>to do this.  No matter which
model you load first, EMF will load all the ones it depends on and will
force you to create a GenModel for them all, or to locate an existing
GenModel.<br>
<blockquote cite="mid:hb9gcl$97u$1@build.eclipse.org" type="cite"><br>
--
<br>
Best regards, Milan
<br>
<br>
</blockquote>
</body>
</html>

--------------070809040303060101000909--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EcoreTools] Multiple packages [message #491934 is a reply to message #491764] Fri, 16 October 2009 15:28 Go to previous messageGo to next message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Ed Merks wrote on Thu, 15 October 2009 13:25
Milan,

I can't imagine why you'd need to create three packages in one Ecore
file. Personally I'd suggest that's a bad idea. One package per file
seems better. Certainly one root package per file is pretty much
necessary, so you could create one root package with three subpackages,
but again, I'd advise against that. Perhaps you should explain why you
consider this a need?


Milan Milanovich wrote:
> Hi,
>
> I'm new to Ecore Tools. I need to create three different packages
> (actually complete metamodels) inside one ecore file. How can i do
> this with Ecore Tools?
>
>
> --
> thx in advance, Milan


Dear Ed,

thank you on your answers. I have one more question related to this subject, I need to define BPMN 2 metamodel related to its specification, but in spec. it includes some packages (activity, data, etc.). So, you propse not to put all of these in one file, e.g., bpmn2.ecore, but to have each package in its separate file?

--
thx, Milan

Re: [EcoreTools] Multiple packages [message #491958 is a reply to message #491934] Fri, 16 October 2009 17:25 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Milan,

Personally I prefer separate packages. Sometimes people use nested
subpackages, but often that results in subtle issues because it's not so
well tested/used.


Milan Milanovich wrote:
> Ed Merks wrote on Thu, 15 October 2009 13:25
>> Milan,
>>
>> I can't imagine why you'd need to create three packages in one Ecore
>> file. Personally I'd suggest that's a bad idea. One package per
>> file seems better. Certainly one root package per file is pretty
>> much necessary, so you could create one root package with three
>> subpackages, but again, I'd advise against that. Perhaps you should
>> explain why you consider this a need?
>>
>>
>> Milan Milanovich wrote:
>> > Hi,
>> >
>> > I'm new to Ecore Tools. I need to create three different packages >
>> (actually complete metamodels) inside one ecore file. How can i do >
>> this with Ecore Tools?
>> >
>> >
>> > -- > thx in advance, Milan
>
>
> Dear Ed,
>
> thank you on your answers. I have one more question related to this
> subject, I need to define BPMN 2 metamodel related to its
> specification, but in spec. it includes some packages (activity, data,
> etc.). So, you propse not to put all of these in one file, e.g.,
> bpmn2.ecore, but to have each package in its separate file?
>
> --
> thx, Milan
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EcoreTools] Multiple packages [message #621483 is a reply to message #491764] Thu, 15 October 2009 18:36 Go to previous message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Dear Ed,

thank you on answer.

I need three packages in one file, because I have two languages and their metamodels (let say UML and BPMN), and I want to create the third language by using concepts from both languages (some hybrid of these two). Then, I need to generate GMF app from this (one) ecore file.

Is this good solution?

--
thx, Milan



Ed Merks wrote on Thu, 15 October 2009 13:25
> Milan,
>
> I can't imagine why you'd need to create three packages in one Ecore
> file. Personally I'd suggest that's a bad idea. One package per file
> seems better. Certainly one root package per file is pretty much
> necessary, so you could create one root package with three subpackages,
> but again, I'd advise against that. Perhaps you should explain why you
> consider this a need?
>
>
> Milan Milanovich wrote:
> > Hi,
> >
> > I'm new to Ecore Tools. I need to create three different packages
> > (actually complete metamodels) inside one ecore file. How can i do
> > this with Ecore Tools?
> >
> >
> > --
> > thx in advance, Milan
Re: [EcoreTools] Multiple packages [message #621484 is a reply to message #491775] Thu, 15 October 2009 20:57 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Milan,

Comments below.

Milan Milanovich wrote:
> Dear Ed,
>
> thank you on answer.
>
> I need three packages in one file, because I have two languages and
> their metamodels (let say UML and BPMN), and I want to create the
> third language by using concepts from both languages (some hybrid of
> these two). Then, I need to generate GMF app from this (one) ecore file.
The need for three Ecore models, i.e., three EPackages, in no way
implies a need for three models in one file, regardless of how these
three models might be related to each other.
>
> Is this good solution?
It sounds like you're focus on the wrong detail. You can have three
package is three different files and those packages can be related in
any arbitrary way...
>
> --
> thx, Milan
>
>
>
> Ed Merks wrote on Thu, 15 October 2009 13:25
>> Milan,
>>
>> I can't imagine why you'd need to create three packages in one Ecore
>> file. Personally I'd suggest that's a bad idea. One package per
>> file seems better. Certainly one root package per file is pretty
>> much necessary, so you could create one root package with three
>> subpackages, but again, I'd advise against that. Perhaps you should
>> explain why you consider this a need?
>>
>>
>> Milan Milanovich wrote:
>> > Hi,
>> >
>> > I'm new to Ecore Tools. I need to create three different packages >
>> (actually complete metamodels) inside one ecore file. How can i do >
>> this with Ecore Tools?
>> >
>> >
>> > -- > thx in advance, Milan
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EcoreTools] Multiple packages [message #621486 is a reply to message #491793] Thu, 15 October 2009 22:27 Go to previous message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Dear Ed,

sorry on my bad EMF knowledge. That would be better solution for me. So, I can connect a model elements in one ecore file to model elements in another file? And also, to show all of these elements in one ecore diagram (as i want to define it in this way), and later to generate GMF app from this?

--
Thx, Milan
Re: [EcoreTools] Multiple packages [message #621487 is a reply to message #491808] Fri, 16 October 2009 04:54 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030403090803000808060903
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Milan,

Comments below.

Milan Milanovich wrote:
> Dear Ed,
>
> sorry on my bad EMF knowledge.
No problem.
> That would be better solution for me. So, I can connect a model
> elements in one ecore file to model elements in another file?
Absolutely. This tutorial will help you understand a little better maybe:

Tutorial: Generating an Extended EMF Model
< http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/slibmod/slibmod.html>

> And also, to show all of these elements in one ecore diagram (as i
> want to define it in this way),
Yes, you drag and drop things from the outline onto the canvas. And
there's a Load Resource... action for loading in other Ecore models so
you can refer to them and display them.
> and later to generate GMF app from this?
Yes, the above tutorial will help prepare the EMF GenModel you'll need.
Note that if you have mutually dependent Ecore models, they'll need to
be contained by a single GenModel. For one way dependencies, you can
put them in separate GenModels as in the tutorial above.
>
> --
> Thx, Milan

--------------030403090803000808060903
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Milan,<br>
<br>
Comments below.<br>
<br>
Milan Milanovich wrote:
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite">Dear
Ed,
<br>
<br>
sorry on my bad EMF knowledge. </blockquote>
No problem.<br>
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite">That
would be better solution for me. So, I can connect a model elements in
one ecore file to model elements in another file? </blockquote>
Absolutely. This tutorial will help you understand a little better
maybe:<br>
<blockquote><a
href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/slibmod/slibmod.html">Tutorial:
Generating an Extended EMF Model</a></blockquote>
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite">And
also, to show all of these elements in one ecore diagram (as i want to
define it in this way), </blockquote>
Yes, you drag and drop things from the outline onto the canvas.  And
there's a Load Resource... action for loading in other Ecore models so
you can refer to them and display them.<br>
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite">and
later to generate GMF app from this?
<br>
</blockquote>
Yes, the above tutorial will help prepare the EMF GenModel you'll
need.  Note that if you have mutually dependent Ecore models, they'll
need to be contained by a single GenModel.  For one way dependencies,
you can put them in separate GenModels as in the tutorial above.<br>
<blockquote cite="mid:hb87kc$brh$1@build.eclipse.org" type="cite"><br>
--
<br>
Thx, Milan
<br>
</blockquote>
</body>
</html>

--------------030403090803000808060903--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EcoreTools] Multiple packages [message #621489 is a reply to message #491829] Fri, 16 October 2009 10:03 Go to previous message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Dear Ed,

thank you on answer.

Ed Merks wrote on Fri, 16 October 2009 00:54
> Milan Milanovich wrote:
> > Dear Ed,
> >
> > sorry on my bad EMF knowledge.
> No problem.
> > That would be better solution for me. So, I can connect a model
> > elements in one ecore file to model elements in another file?
> Absolutely. This tutorial will help you understand a little better maybe:
>
> Tutorial: Generating an Extended EMF Model
> < http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/slibmod/slibmod.html>


Yes, I read this tutorial already, but obviously I missed this part with split files.

Ed Merks wrote on Fri, 16 October 2009 00:54
> > And also, to show all of these elements in one ecore diagram (as i
> > want to define it in this way),
> Yes, you drag and drop things from the outline onto the canvas. And
> there's a Load Resource... action for loading in other Ecore models so
> you can refer to them and display them.
> > and later to generate GMF app from this?
> Yes, the above tutorial will help prepare the EMF GenModel you'll need.
> Note that if you have mutually dependent Ecore models, they'll need to
> be contained by a single GenModel. For one way dependencies, you can
> put them in separate GenModels as in the tutorial above.


Can you tell me ho to make single GenModel from multiple mutually dependant Ecore models?

--
Best regards, Milan
Re: [EcoreTools] Multiple packages [message #621490 is a reply to message #621489] Fri, 16 October 2009 13:20 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070809040303060101000909
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Milan,

Comments below.

Milan Milanovich wrote:
> Dear Ed,
> thank you on answer.
>
> Ed Merks wrote on Fri, 16 October 2009 00:54
>> Milan Milanovich wrote:
>> > Dear Ed,
>> >
>> > sorry on my bad EMF knowledge. No problem.
>> > That would be better solution for me. So, I can connect a model >
>> elements in one ecore file to model elements in another file?
>> Absolutely. This tutorial will help you understand a little better
>> maybe:
>>
>> Tutorial: Generating an Extended EMF Model
>> < http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips
>> e.emf.doc/tutorials/slibmod/slibmod.html>
>
>
> Yes, I read this tutorial already, but obviously I missed this part
> with split files.
>
> Ed Merks wrote on Fri, 16 October 2009 00:54
>> > And also, to show all of these elements in one ecore diagram (as i
>> > want to define it in this way), Yes, you drag and drop things from
>> the outline onto the canvas. And there's a Load Resource... action
>> for loading in other Ecore models so you can refer to them and
>> display them.
>> > and later to generate GMF app from this?
>> Yes, the above tutorial will help prepare the EMF GenModel you'll
>> need. Note that if you have mutually dependent Ecore models, they'll
>> need to be contained by a single GenModel. For one way dependencies,
>> you can put them in separate GenModels as in the tutorial above.
>
>
> Can you tell me ho to make single GenModel from multiple mutually
> dependant Ecore models?
You'll find you're unable *not *to do this. No matter which model you
load first, EMF will load all the ones it depends on and will force you
to create a GenModel for them all, or to locate an existing GenModel.
>
> --
> Best regards, Milan
>

--------------070809040303060101000909
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Milan,<br>
<br>
Comments below.<br>
<br>
Milan Milanovich wrote:
<blockquote cite="mid:hb9gcl$97u$1@build.eclipse.org" type="cite">Dear
Ed, <br>
thank you on answer.
<br>
<br>
Ed Merks wrote on Fri, 16 October 2009 00:54
<br>
<blockquote type="cite">Milan Milanovich wrote:
<br>
&gt; Dear Ed,
<br>
&gt;
<br>
&gt; sorry on my bad EMF knowledge. No problem.
<br>
&gt; That would be better solution for me. So, I can connect a model
&gt; elements in one ecore file to model elements in another file?
Absolutely. This tutorial will help you understand a little better
maybe:
<br>
<br>
    Tutorial: Generating an Extended EMF Model
<br>
    &lt;  <a class="moz-txt-link-freetext" href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips"> http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips</a>
e.emf.doc/tutorials/slibmod/slibmod.html&gt;
<br>
</blockquote>
<br>
<br>
Yes, I read this tutorial already, but obviously I missed this part
with split files.
<br>
<br>
Ed Merks wrote on Fri, 16 October 2009 00:54
<br>
<blockquote type="cite">&gt; And also, to show all of these elements
in one ecore diagram (as i &gt; want to define it in this way), Yes,
you drag and drop things from the outline onto the canvas.  And there's
a Load Resource... action for loading in other Ecore models so you can
refer to them and display them.
<br>
&gt; and later to generate GMF app from this?
<br>
Yes, the above tutorial will help prepare the EMF GenModel you'll
need.  Note that if you have mutually dependent Ecore models, they'll
need to be contained by a single GenModel.  For one way dependencies,
you can put them in separate GenModels as in the tutorial above.
<br>
</blockquote>
<br>
<br>
Can you tell me ho to make single GenModel from multiple mutually
dependant Ecore models?
<br>
</blockquote>
You'll find you're unable <b>not </b>to do this.  No matter which
model you load first, EMF will load all the ones it depends on and will
force you to create a GenModel for them all, or to locate an existing
GenModel.<br>
<blockquote cite="mid:hb9gcl$97u$1@build.eclipse.org" type="cite"><br>
--
<br>
Best regards, Milan
<br>
<br>
</blockquote>
</body>
</html>

--------------070809040303060101000909--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EcoreTools] Multiple packages [message #621493 is a reply to message #491764] Fri, 16 October 2009 15:28 Go to previous message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Ed Merks wrote on Thu, 15 October 2009 13:25
> Milan,
>
> I can't imagine why you'd need to create three packages in one Ecore
> file. Personally I'd suggest that's a bad idea. One package per file
> seems better. Certainly one root package per file is pretty much
> necessary, so you could create one root package with three subpackages,
> but again, I'd advise against that. Perhaps you should explain why you
> consider this a need?
>
>
> Milan Milanovich wrote:
> > Hi,
> >
> > I'm new to Ecore Tools. I need to create three different packages
> > (actually complete metamodels) inside one ecore file. How can i do
> > this with Ecore Tools?
> >
> >
> > --
> > thx in advance, Milan


Dear Ed,

thank you on your answers. I have one more question related to this subject, I need to define BPMN 2 metamodel related to its specification, but in spec. it includes some packages (activity, data, etc.). So, you propse not to put all of these in one file, e.g., bpmn2.ecore, but to have each package in its separate file?

--
thx, Milan
Re: [EcoreTools] Multiple packages [message #621495 is a reply to message #621493] Fri, 16 October 2009 17:25 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Milan,

Personally I prefer separate packages. Sometimes people use nested
subpackages, but often that results in subtle issues because it's not so
well tested/used.


Milan Milanovich wrote:
> Ed Merks wrote on Thu, 15 October 2009 13:25
>> Milan,
>>
>> I can't imagine why you'd need to create three packages in one Ecore
>> file. Personally I'd suggest that's a bad idea. One package per
>> file seems better. Certainly one root package per file is pretty
>> much necessary, so you could create one root package with three
>> subpackages, but again, I'd advise against that. Perhaps you should
>> explain why you consider this a need?
>>
>>
>> Milan Milanovich wrote:
>> > Hi,
>> >
>> > I'm new to Ecore Tools. I need to create three different packages >
>> (actually complete metamodels) inside one ecore file. How can i do >
>> this with Ecore Tools?
>> >
>> >
>> > -- > thx in advance, Milan
>
>
> Dear Ed,
>
> thank you on your answers. I have one more question related to this
> subject, I need to define BPMN 2 metamodel related to its
> specification, but in spec. it includes some packages (activity, data,
> etc.). So, you propse not to put all of these in one file, e.g.,
> bpmn2.ecore, but to have each package in its separate file?
>
> --
> thx, Milan
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[EMF Compare] Getting started
Next Topic:[EMF Compare] Getting started
Goto Forum:
  


Current Time: Thu Apr 18 11:36:28 GMT 2024

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

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

Back to the top