Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPand2] Splitting one big xpt-file
[XPand2] Splitting one big xpt-file [message #794545] Thu, 09 February 2012 12:26 Go to next message
Florian Reischl is currently offline Florian ReischlFriend
Messages: 5
Registered: February 2012
Junior Member
Hello,

can I split one big file, e.g. icd.xpt to more files?
e.g. icd.xpt (small), icda.xpt, icdb.xpt, ...

If yes, how can I import the files?

THX
Re: [XPand2] Splitting one big xpt-file [message #794580 is a reply to message #794545] Thu, 09 February 2012 13:14 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 360
Registered: July 2009
Location: Dortmund
Senior Member

Florian,

sure, actually this is quite common.

You can call other definitions with the EXPAND keyword, the definitions need not to be in the same file. You can either import the namespace of the file
«IMPORT my::other::template»

«DEFINE Xyz FOR MyType»
   «EXPAND DefinitionFromOtherTemplate FOR this»
   ...

or qualified
«DEFINE Xyz FOR MyType»
   «EXPAND my::other::template::DefinitionFromOtherTemplate FOR this»
   ...

See Root.xpt as an example (ignore the encoding issues if you see some, these are just the guillemot brackets).

Regards,
~Karsten


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Previous Topic:[Acceleo] Can I modify a section of a template from another section?
Next Topic:Can I make the jet2java directory visible?
Goto Forum:
  


Current Time: Fri Dec 19 12:14:56 GMT 2014

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

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