Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to split the xtend generator file?
How to split the xtend generator file? [message #834676] Mon, 02 April 2012 08:50 Go to next message
John Locke is currently offline John LockeFriend
Messages: 23
Registered: July 2010
Junior Member
Hello,

I have written a grammar with xtext. As the next step i wrote a code generator in xtend.
After writing the code generator i had a very big generator file. Now i want to split up this file. How can i split the generator file in two or more files?

Regards,
John

[Updated on: Mon, 02 April 2012 09:12]

Report message to a moderator

Re: How to split the xtend generator file? [message #834686 is a reply to message #834676] Mon, 02 April 2012 09:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
hi

Simply split up the define s to different files and call the with
EXPAND path::to::File::NameOfDefine


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to split the xtend generator file? [message #834694 is a reply to message #834686] Mon, 02 April 2012 09:16 Go to previous messageGo to next message
John Locke is currently offline John LockeFriend
Messages: 23
Registered: July 2010
Junior Member
Hey,

i have already split the generated files. I want to split the generator file. I wrote the generator in xtend and not in xpand. Sorry was a fault in the first post.
Re: How to split the xtend generator file? [message #834700 is a reply to message #834694] Mon, 02 April 2012 09:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi,

simply use Guice and Xtend means

@Inject PartB partB
@Inject extension PartC
....
partB.somemethod(xxx,yyyy)
xxx.somemethodofpartc(yyyy)





Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to split the xtend generator file? [message #834703 is a reply to message #834700] Mon, 02 April 2012 09:33 Go to previous messageGo to next message
John Locke is currently offline John LockeFriend
Messages: 23
Registered: July 2010
Junior Member
In which file do i have to add this code snippet?
Re: How to split the xtend generator file? [message #834707 is a reply to message #834703] Mon, 02 April 2012 09:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
In any xtend file - you are the guy who know how to split up the stuff meaningfully

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to split the xtend generator file? [message #834710 is a reply to message #834707] Mon, 02 April 2012 09:42 Go to previous message
John Locke is currently offline John LockeFriend
Messages: 23
Registered: July 2010
Junior Member
Thanks! It works!
Previous Topic:ignore linking errors
Next Topic:"mixed" global scoping
Goto Forum:
  


Current Time: Fri Mar 29 12:56:57 GMT 2024

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

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

Back to the top