Skip to main content


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: 762
Registered: July 2009
Location: Dortmund, Germany
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, EMF, Eclipse IDE?
Go to: http://devhub.karakun.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 Mar 29 00:12:33 GMT 2024

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

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

Back to the top