Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to support user customization of a code generators Xtend2-based templates?(Advice on porting a code generator from Xtext1 to Xtext2: Analogy for Xpands AOP for user customization of Xtend2 templates)
How to support user customization of a code generators Xtend2-based templates? [message #1017929] Tue, 12 March 2013 20:23 Go to next message
Torsten Juergeleit is currently offline Torsten JuergeleitFriend
Messages: 18
Registered: July 2009
Junior Member
While porting a code generator from Xtext 1.1 to Xtext 2.3 I'm wondering how to support user customization of the templates now embedded in Xtend2 classes. With Xpand AOP it was very easy to tweak the code generators default templates.

What kind of approach are you using to allow users to customize the templates shipped with your code generator?

Cheers,
Torsten
Re: How to support user customization of a code generators Xtend2-based templates? [message #1020576 is a reply to message #1017929] Mon, 18 March 2013 13:46 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
You have to add it with plain Xtend / Java / Eclipse means, e.g. have a
customization properties class injected that is populated by reading
Eclipse preferences, a properties file or something similar.

Am 12.03.13 22:34, schrieb Torsten Juergeleit:
> While porting a code generator from Xtext 1.1 to Xtext 2.3 I'm wondering
> how to support user customization of the templates now embedded in
> Xtend2 classes. With Xpand AOP it was very easy to tweak the code
> generators default templates.
>
> What kind of approach are you using to allow users to customize the
> templates shipped with your code generator?
>
> Cheers,
> Torsten


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
icon5.gif  Re: How to support user customization of a code generators Xtend2-based templates? [message #1020775 is a reply to message #1020576] Mon, 18 March 2013 22:26 Go to previous message
Torsten Juergeleit is currently offline Torsten JuergeleitFriend
Messages: 18
Registered: July 2009
Junior Member
What are your recommendations regarding support for template overriding?

Searching the web I found the following approaches (I'm not allowed to add URLs, therefore the corresponding URLs are omitted Embarrassed ):
  • hook template methods in the Xtend2 templates are used in the spray project
  • additional Xpand templates are used in Eclipse Texo

Any suggestions?

Jan Kohnlein wrote on Mon, 18 March 2013 09:46
You have to add it with plain Xtend / Java / Eclipse means, e.g. have a
customization properties class injected that is populated by reading
Eclipse preferences, a properties file or something similar.
Previous Topic:Content-Assist for elements in a list
Next Topic:How to implement a code generators workflow nowadays (MWE2 or Xtend2)?
Goto Forum:
  


Current Time: Thu Apr 25 20:48:17 GMT 2024

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

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

Back to the top