tag:blogger.com,1999:blog-6255758224607466565.post5268693206983317997..comments2024-02-11T10:25:39.241+01:00Comments on Sebastian Zarnekow's Blog: Xtext Corner RevivedAnonymoushttp://www.blogger.com/profile/05886096380926364322noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6255758224607466565.post-45734990941814942402012-11-01T14:17:14.406+01:002012-11-01T14:17:14.406+01:00Thank you very much for your helpful suggestions, ...Thank you very much for your helpful suggestions, Sebastian! :)Hendyhttps://www.blogger.com/profile/05192845149798446052noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-71351206005566971542012-11-01T14:12:24.872+01:002012-11-01T14:12:24.872+01:00There was a question on SO regarding Xtext and Xte...There was a question on SO regarding Xtext and Xtend: http://stackoverflow.com/questions/10917386/linking-xtext-with-stringtemplate-code-generator<br />I personally prefer to use Xtend over ST since it's much more powerful, especially for the aspects that are not directly related to code gen.<br /><br />And yes, it's perfectly reasonable to start with an Ecore model and create the grammar for that afterwards. You can import the EPackage into your grammar in order to refer to its EClasses. Please refer to the docs for details.<br /><br />Using Xtext without OSGi is possible, too, but you'll have to deal with the dependencies manually which may be cumbersome.Anonymoushttps://www.blogger.com/profile/05886096380926364322noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-29589644417162404022012-11-01T13:44:36.819+01:002012-11-01T13:44:36.819+01:00Thanks Sebastian.
Indeed, my comment is because I...Thanks Sebastian.<br /><br />Indeed, my comment is because I'm dealing with "pure Ecore models" lately.<br /><br />Last time I used Xtext was about a year ago...<br /><br />Do you think one should go straight to Xtext.. or start with EMF first and after the metamodel is "stable", only then incorporate Xtext and create a grammar for that metamodel? I was assuming that it's possible to use previously created EMF metamodels with Xtext. (i.e. "just add grammar")<br /><br />Right now we're using plain OSGi (not Eclipse) in Karaf with EMF, and even getting EMF to work well is already a chore... I'm not sure what are the challenges of running Xtext under OSGi, not to mention sharing another technology team members.<br /><br />For templating and generation we use a combination of Mustache and StringTemplate, in different parts. I also have used Xtend but I'm not sure how it applies to our use case now...<br /><br />Also, do you have a guidelines or thoughts regarding StringTemplate vs Xtend ?Hendyhttps://www.blogger.com/profile/05192845149798446052noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-46595828972620306822012-11-01T13:35:57.196+01:002012-11-01T13:35:57.196+01:00Thanks, Hendy.
Please note that the 'separate...Thanks, Hendy.<br /><br />Please note that the 'separate ASG' step is implicit with Xtext. It's often referred to as linking or reference resolution.<br /><br />Regards,<br />SebastianAnonymoushttps://www.blogger.com/profile/05886096380926364322noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-76240490509904022852012-10-31T16:37:16.117+01:002012-10-31T16:37:16.117+01:00Awesome stuff!
I wasn't aware there should be...Awesome stuff!<br /><br />I wasn't aware there should be a separate ASG step involved.<br /><br />Thank you! :)Hendyhttps://www.blogger.com/profile/05192845149798446052noreply@blogger.com