Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » how to generate the ecore model from your grammar
how to generate the ecore model from your grammar [message #899265] Tue, 31 July 2012 09:17 Go to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
hi,

i have crated my own dsl grammar and from that i want to see(have ) the corresponding Ecore model. can somebody knows how to dot it?

thks
Best regards ,
Frank
Re: how to generate the ecore model from your grammar [message #899278 is a reply to message #899265] Tue, 31 July 2012 10:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Hi do not understand your problem. Xtext generates the score into
src-gen

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: how to generate the ecore model from your grammar [message #899297 is a reply to message #899278] Tue, 31 July 2012 12:06 Go to previous messageGo to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
i have checked the src-gen to see the Ecore generated , butthere is no Ecore there , only a xmi file.
as i said before , i have created an Ecore file and with that i generated the correesponding grammar of that ecore model, last time i was discussing with people in the forum and they advice that if i want to make change in my Ecore without changing my grammar is preferable to make the change directly in my grammar and that will automatically change(update) my Ecore model .
now i was looking a way to change my grammar and see the effect in my ecore . i have looked in the src--gen but there is no ecor ethere only xmi file , that is why i'm asking if there is a way to generate that ecore or to see the direct relation between the 2(Ecore and the corresponding grammar).
Re: how to generate the ecore model from your grammar [message #899320 is a reply to message #899297] Tue, 31 July 2012 13:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Hi you have to change the header of the grammar. Compare your header
and workflow with one of a newly created Xtext project

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: how to generate the ecore model from your grammar [message #899324 is a reply to message #899320] Tue, 31 July 2012 13:21 Go to previous messageGo to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
hi
i know that i'm disturbing , but can you explain what you means by changing the heade of my grammar . i'm not sure i have understood what you are trying to said.
Re: how to generate the ecore model from your grammar [message #899326 is a reply to message #899324] Tue, 31 July 2012 13:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Hi as I said use the new Xtext project wizard and compare the files

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: how to generate the ecore model from your grammar [message #899327 is a reply to message #899324] Tue, 31 July 2012 13:27 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Hi as I said use the new Xtext project wizard and compare the files

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: how to generate the ecore model from your grammar [message #899328 is a reply to message #899324] Tue, 31 July 2012 13:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Hi as I said use the new Xtext project wizard and compare the files

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: how to generate the ecore model from your grammar [message #899505 is a reply to message #899327] Wed, 01 August 2012 08:23 Go to previous messageGo to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
thanks Christian ,
i think that at the beginning i was misunderstanding what you were trying to said , but i did as you said and may i can conclude that xtext can generate the Ecore and the genModel only when you start a new xtext project with the Xtext project wizard. But if you builded a project from an Ecore model and you want to modify your grammar in the futur there is no way too have a direct relation between your ecore and the grammar such that when you change your grammar that change directly your Ecore.
Why this questions?
i ask this because i'm suppose to create a model similar to the one propose by the XSd technologies, and with the XSD you can import file in another ad make many imports in a single file. i asked last week to the forum and the answers says that you can import a grammar in another grammar . but i know that with Ecore you can Import a model in another one that is why i want to create my Ecore model at the beginning and generate the grammar from that, since in meta-model i will have may imported file.
so now i'm looking for a way relate the changement made in my grammar directly to my Ecore .
Re: how to generate the ecore model from your grammar [message #899675 is a reply to message #899505] Wed, 01 August 2012 18:41 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Hi,

i still do not get your problem.

if you compare grammar and workflow you will see that to do the get the ecore derived and what to do to use an existing one.

i dont understand what you are saying regading imports. are you talking about importing one ecore into another?

i think for advanced metamodel the best way for change management is to use a manually maintained metamodel.

~Christian
Previous Topic:Save event XtextEditor
Next Topic:guava dependencies
Goto Forum:
  


Current Time: Mon Dec 22 13:45:04 GMT 2014

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

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