Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Create EMF model
Create EMF model [message #1137999] Mon, 14 October 2013 22:15 Go to next message
Mahsa P is currently offline Mahsa PFriend
Messages: 115
Registered: July 2013
Senior Member
Hi my friends

I created one diagram by GMF editor. This means that I ran GMF plug-in and created one instance from created diagram file.
for more explain, I have one ecore file and create one instance from it by GMF. This image show type of my instance.
index.php/fa/16458/0/
Now I want convert this instance to EMF model. What should i do?
I'm so grateful if help me.
  • Attachment: 1.png
    (Size: 3.25KB, Downloaded 369 times)
Re: Create EMF model [message #1138362 is a reply to message #1137999] Tue, 15 October 2013 04:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Mahsa,

Is the model instance stored in the *.test resource?

On 15/10/2013 12:15 AM, Mahsa P wrote:
> Hi my friends
>
> I created one diagram by GMF editor. This means that I ran GMF plug-in and created one instance from created diagram file.
> for more explain, I have one ecore file and create one instance from it by GMF. This image show type of my instance.
>
> Now I want convert this instance to EMF model. What should i do?
> I'm so grateful if help me.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Create EMF model [message #1138386 is a reply to message #1138362] Tue, 15 October 2013 04:25 Go to previous messageGo to next message
Donat Mueller is currently offline Donat MuellerFriend
Messages: 11
Registered: January 2013
Location: switzerland
Junior Member
Your GMF created instance is an instance of your custom meta model and can therefore not be converted to EMF. You could do a model to model transformation based on your emf model and the ecore meta model. But this is probably not what you want to do.
You can use xpand to create other artefacts from your instance such as an EMF model.
Re: Create EMF model [message #1138409 is a reply to message #1138386] Tue, 15 October 2013 04:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Donat,

Comments below.

On 15/10/2013 6:25 AM, Donat Mueller wrote:
> Your GMF created instance is an instance of your custom meta model and
> can therefore not be converted to EMF.
I assume it already is an instance of an Ecore model and hence is an EMF
model.
> You could do a model to model transformation based on your emf model
> and the ecore meta model. But this is probably not what you want to do.
It's totally unclear what the question is asking, but I generally try to
assume something simple until it's clear they really mean something as
complicated as mapping their model instances to Ecore instances...
> You can use xpand to create other artefacts from your instance such as
> an EMF model.
I suspect they just need to read their resource and that's the EMF model
they're asking for, but that seems almost too obvious, doesn't it?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Create EMF model [message #1138780 is a reply to message #1138409] Tue, 15 October 2013 10:17 Go to previous messageGo to next message
Mahsa P is currently offline Mahsa PFriend
Messages: 115
Registered: July 2013
Senior Member
Ed Merks,
> Is the model instance stored in the *.test resource?
yes, and *.test_diagram is graphical form for *.test. in fact, "test" is name of my ecore file and when i run created GMF editor for this meta-model,"test Diagram" is added to list of project types and i can create instance from "test Diagram" that this instance has "*.test" type. "*.test_diagram" is form of graphical for "*.test". these two file stored in runtime projects but when I import these to my workspace, they are similar to XML type.

Donat Mueller

> Your GMF created instance is an instance of your custom meta model and
> can therefore not be converted to EMF.
I think Ed Merks say true about it. this instance is one instance from an ecore model and it's structure is similar to EMF model but i want this instance introduce in EMF model type.
> You can use xpand to create other artefacts from your instance such as
> an EMF model.
if i understand correctly, you say i can create this instance in "EMF model" type instead of "diagram file". I right click on "default.test_diagram" and select open with> other. but there isn't "EMF model" type in open list.
Re: Create EMF model [message #1139025 is a reply to message #1138780] Tue, 15 October 2013 13:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Mahsa,

Comments below.

On 15/10/2013 12:17 PM, Mahsa P wrote:
> Ed Merks,
>> Is the model instance stored in the *.test resource?
> yes, and *.test_diagram is graphical form for *.test. in fact, "test"
> is name of my ecore file and when i run created GMF editor for this
> meta-model,"test Diagram" is added to list of project types and i can
> create instance from "test Diagram" that this instance has "*.test"
> type. "*.test_diagram" is form of graphical for "*.test". these two
> file stored in runtime projects but when I import these to my
> workspace, they are similar to XML type.
>
> Donat Mueller
>
>> Your GMF created instance is an instance of your custom meta model
>> and can therefore not be converted to EMF.
> I think Ed Merks say true about it. this instance is one instance from
> an ecore model and it's structure is similar to EMF model but i want
> this instance introduce in EMF model type.
If I understand correctly, you just need to load the *.test file as a
resource it and it contain your EMF model.
>> You can use xpand to create other artefacts from your instance such
>> as an EMF model.
> if i understand correctly, you say i can create this instance in "EMF
> model" type instead of "diagram file". I right click on
> "default.test_diagram" and select open with> other. but there isn't
> "EMF model" type in open list.
I don't know if you chose to store your model in the diagram file or in
a separate file. In either case, you can load that separate
file/resource or the diagram file/resource and it will contain your model.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Create EMF model [message #1139043 is a reply to message #1139025] Tue, 15 October 2013 13:51 Go to previous messageGo to next message
Mahsa P is currently offline Mahsa PFriend
Messages: 115
Registered: July 2013
Senior Member
Ed Merks,
>>> Your GMF created instance is an instance of your custom meta model
>>> and can therefore not be converted to EMF.
>> I think Ed Merks say true about it. this instance is one instance from
>> an ecore model and it's structure is similar to EMF model but i want
>> this instance introduce in EMF model type.
>If I understand correctly, you just need to load the *.test file as a
>resource it and it contain your EMF model.
yes, I want load the *.test as EMF model. i need this EMF model for model transformation by ETL so exactly "EMF MODEL" type is important for me.
>> if i understand correctly, you say i can create this instance in "EMF
>> model" type instead of "diagram file". I right click on
>> "default.test_diagram" and select open with> other. but there isn't
>> "EMF model" type in open list.
>I don't know if you chose to store your model in the diagram file or in
>a separate file. In either case, you can load that separate
>file/resource or the diagram file/resource and it will contain your model.
how do i load another type? do i load separate type in runtime eclipse? if it's possible, explain more about it please. thanks
Re: Create EMF model [message #1140007 is a reply to message #1139043] Wed, 16 October 2013 04:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Mahsa,

Comments below.

On 15/10/2013 3:51 PM, Mahsa P wrote:
> Ed Merks,
>>>> Your GMF created instance is an instance of your custom meta model
>>>> and can therefore not be converted to EMF.
>>> I think Ed Merks say true about it. this instance is one instance
>>> from an ecore model and it's structure is similar to EMF model but i
>>> want this instance introduce in EMF model type.
>> If I understand correctly, you just need to load the *.test file as a
>> resource it and it contain your EMF model.
> yes, I want load the *.test as EMF model.
EMF's generated editor shows how to do this. The introductory overview
shows how too. What have you tried?
> i need this EMF model for model transformation by ETL so exactly "EMF
> MODEL" type is important for me.
But, I have no idea what you mean by EMF MODEL type. If you have
Epsilon questions, ask on their newsgroup.
>>> if i understand correctly, you say i can create this instance in
>>> "EMF model" type instead of "diagram file". I right click on
>>> "default.test_diagram" and select open with> other. but there isn't
>>> "EMF model" type in open list.
>> I don't know if you chose to store your model in the diagram file or
>> in a separate file. In either case, you can load that separate
>> file/resource or the diagram file/resource and it will contain your
>> model.
> how do i load another type?
I don't know what you mean by that. Again is this question Epsilon
specific?
> do i load separate type in runtime eclipse? if it's possible, explain
> more about it please. thanks
If you invoke Generate Test Code for you model, there is a generated
XyzExample.java in the *.tests project that shows basic things like how
to load and save resources in a stand alone application.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Create EMF model [message #1141143 is a reply to message #1140007] Wed, 16 October 2013 21:35 Go to previous messageGo to next message
Mahsa P is currently offline Mahsa PFriend
Messages: 115
Registered: July 2013
Senior Member
Dear Ed Merks, Thanks from your answers. i discuss about some questions in Epsilon newsgroup but about :

>>>>> Your GMF created instance is an instance of your custom meta model
>>>>> and can therefore not be converted to EMF.
>>>> I think Ed Merks say true about it. this instance is one instance
>>>> from an ecore model and it's structure is similar to EMF model but i
>>>> want this instance introduce in EMF model type.
>>> If I understand correctly, you just need to load the *.test file as a
>>> resource it and it contain your EMF model.
>> yes, I want load the *.test as EMF model.
>EMF's generated editor shows how to do this. The introductory overview
>shows how too. What have you tried?
Sorry but I don't understand you say about which EMF's generated editor. does your answer mean that there are some facilities in created run-time editor for transforming "*.test" to EMF type? however I don't know what do i transform this created file to EMF file!
Re: Create EMF model [message #1141666 is a reply to message #1141143] Thu, 17 October 2013 05:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Mahsa,

Follow one of EMF's tutorials.


On 16/10/2013 11:35 PM, Mahsa P wrote:
> Dear Ed Merks, Thanks from your answers. i discuss about some
> questions in Epsilon newsgroup but about :
>
>>>>>> Your GMF created instance is an instance of your custom meta
>>>>>> model and can therefore not be converted to EMF.
>>>>> I think Ed Merks say true about it. this instance is one instance
>>>>> from an ecore model and it's structure is similar to EMF model but
>>>>> i want this instance introduce in EMF model type.
>>>> If I understand correctly, you just need to load the *.test file as
>>>> a resource it and it contain your EMF model.
>>> yes, I want load the *.test as EMF model.
>> EMF's generated editor shows how to do this. The introductory
>> overview shows how too. What have you tried?
> Sorry but I don't understand you say about which EMF's generated
> editor. does your answer mean that there are some facilities in
> created run-time editor for transforming "*.test" to EMF type?
> however I don't know what do i transform this created file to EMF file!
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Create EMF model [message #1142420 is a reply to message #1141666] Thu, 17 October 2013 16:06 Go to previous message
Mahsa P is currently offline Mahsa PFriend
Messages: 115
Registered: July 2013
Senior Member
OK, thanks a lot.

[Updated on: Thu, 17 October 2013 16:07]

Report message to a moderator

Previous Topic:TEXO based application architecture
Next Topic:[TEXO] Failed to create the FK
Goto Forum:
  


Current Time: Fri Mar 29 12:40:21 GMT 2024

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

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

Back to the top