Skip to main content



      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 02:45 Go to next message
Eclipse UserFriend
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 02:50 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Generate code with Xtend of ReqIF model [message #1790301 is a reply to message #1790297] Fri, 08 June 2018 03:29 Go to previous messageGo to next message
Eclipse UserFriend
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 08:31 Go to previous messageGo to next message
Eclipse UserFriend
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 08:35 Go to previous messageGo to next message
Eclipse UserFriend
the package of your metamodel.
e.g.

org.eclipse.rmf.reqif10.ReqIF10Package
Re: Generate code with Xtend of ReqIF model [message #1790347 is a reply to message #1790343] Fri, 08 June 2018 09:24 Go to previous message
Eclipse UserFriend
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: Tue Jun 24 08:54:56 EDT 2025

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

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

Back to the top