Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] model Root
[Xpand] model Root [message #981575] Mon, 12 November 2012 09:25 Go to next message
Adnan AL-SOSWA is currently offline Adnan AL-SOSWA
Messages: 41
Registered: May 2010
Member
Hi all ,

I have a question concerning Modeling , Should any Model has a Root ? if Yes how I can access the Root of any model.xmi using xpand after I create dynamic instance of the metamodel ?(I want general template to access root of any Model.xmi)

if not could you please show me an example of a model without Root?

Thank you very much in advance.
Re: [Xpand] model Root [message #981725 is a reply to message #981575] Mon, 12 November 2012 11:47 Go to previous message
Karsten Thoms is currently offline Karsten Thoms
Messages: 353
Registered: July 2009
Location: Dortmund
Senior Member

There is no need for either way, both is possible. The "root" is or are the elements that are direct content of a Resource. The root of any object can be accessed with eRootContainer. If you have multiple elements as direct content of the resource, you would have different results for that operation, since each of them is a root element.

Regards,
~Karsten


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Previous Topic:XMLBeautifier - Xpand - model to code generation
Next Topic:[Acceleo] generation exception after deploy
Goto Forum:
  


Current Time: Fri Apr 18 11:52:22 EDT 2014

Powered by FUDForum. Page generated in 0.01606 seconds