Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » xtend2 dynamic classloading?
xtend2 dynamic classloading? [message #940493] Thu, 11 October 2012 13:34 Go to next message
Martin Taal is currently offline Martin Taal
Messages: 5326
Registered: July 2009
Senior Member
Hi,
I have started to research/try how to rewrite my xpand templates to xtend2 for the EMFT Texo project. A user of Texo can
provide their own templates to override or extend existing templates.

http://wiki.eclipse.org/Texo/Template_Overriding

At runtime I check the development project to see if there are templates in the development project itself in specific
locations and use these instead/in addition to the Texo templates.

With xtend2 the templates are all in java. What could be a first thing to look at to see how I can support dynamic
template extension?

--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: xtend2 dynamic classloading? [message #941394 is a reply to message #940493] Fri, 12 October 2012 09:32 Go to previous message
Karsten Thoms is currently offline Karsten Thoms
Messages: 353
Registered: July 2009
Location: Dortmund
Senior Member

Hi Martin,

with Xtend you would likely use Guice anyway. The default generator would provide a runtime module. Since Xtend templates are Java classes you usually don't need to configure them explicitly and would usually inject instances of the known template classes in the generator. If now customizations are required the user would provide a customized Guice module which would bind the template class to exchange by the custom implementation.

Best wishes,
~Karsten


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Previous Topic:[Acceleo] Ordered unbound choices / EFeatureMapEntry
Next Topic:Problem installing Xpand
Goto Forum:
  


Current Time: Thu Jul 31 07:37:54 EDT 2014

Powered by FUDForum. Page generated in 0.04113 seconds