Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generate code with Xtend of ReqIF model
Generate code with Xtend of ReqIF model [message #1790296] Fri, 08 June 2018 06:45 Go to next message
Peter Altmayer is currently offline Peter AltmayerFriend
Messages: 7
Registered: April 2018
Junior Member
Hi,

i want to write a code generator with Xtend on a Non-Xtext model based on this tutorial.
But I have problems understanding the part where to reference the model I want to gernerate code.
In detail: I want to generate code of a ReqIF model (org.eclipse.rmf.reqif10).

Where do I have to reference this model?
Re: Generate code with Xtend of ReqIF model [message #1790297 is a reply to message #1790296] Fri, 08 June 2018 06:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i am not sure if i understand your problem. you should have some plugins installed in your eclipse that provide that metamodel so you can add these as dependency to your manifest


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generate code with Xtend of ReqIF model [message #1790301 is a reply to message #1790297] Fri, 08 June 2018 07:29 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

When you properly set up the resource services as described, your model will be contained in the Resource instance that is passed to the IGenerator implementation. Of course you need some understanding of EMF, which is also used by org.eclipse.rmf.
Re: Generate code with Xtend of ReqIF model [message #1790342 is a reply to message #1790301] Fri, 08 June 2018 12:31 Go to previous messageGo to next message
Peter Altmayer is currently offline Peter AltmayerFriend
Messages: 7
Registered: April 2018
Junior Member
I added the plugins to the dependencies that's not the issue.

I do not understand how to
Quote:
properly set up the resource services as described


I think, i have to do that on the workflow with "registerGenerateEPackage = ..." but which packages do I have to register? Well, obviously the package of the plugin(s), but where do I get the names from?
Re: Generate code with Xtend of ReqIF model [message #1790343 is a reply to message #1790342] Fri, 08 June 2018 12:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
the package of your metamodel.
e.g.

org.eclipse.rmf.reqif10.ReqIF10Package


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generate code with Xtend of ReqIF model [message #1790347 is a reply to message #1790343] Fri, 08 June 2018 13:24 Go to previous message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 157
Registered: February 2016
Senior Member
A nice presentation about building Code Generators for Non-Xtext Models with Xtend is available under https://www.youtube.com/watch?v=teOULtQ81-U
Previous Topic:How to fetch value from my text
Next Topic:Antlr4 to xtext
Goto Forum:
  


Current Time: Wed Apr 24 19:54:44 GMT 2024

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

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

Back to the top