Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [solved] how to get the parent name in XTEND(Is there something like referencedAttr.parent.name)
[solved] how to get the parent name in XTEND [message #1150199] Tue, 22 October 2013 16:10 Go to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 248
Registered: June 2013
Senior Member
I used qualified name to get an attribute of a class as a reference (Aclass.Battr)

If I use referencedAttr.name in the generator, I get "Battr".
How do I get the name of the class?
Is there something like referencedAttr.parent.name which returns "Aclass" ?

[Updated on: Mon, 11 November 2013 11:20]

Report message to a moderator

Re: how to get the parent name in XTEND [message #1150207 is a reply to message #1150199] Tue, 22 October 2013 16:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13661
Registered: July 2009
Senior Member
hi you get the parent with child.eContainer()

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: how to get the parent name in XTEND [message #1150252 is a reply to message #1150207] Tue, 22 October 2013 16:50 Go to previous message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 248
Registered: June 2013
Senior Member
Thanks Christian for the fast hint works perfectly well

[Updated on: Tue, 22 October 2013 17:00]

Report message to a moderator

Previous Topic:How to serialize DSL-Files to UML-Model
Next Topic:Using eclipse menu for code generation
Goto Forum:
  


Current Time: Sun Nov 29 08:46:45 GMT 2020

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

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

Back to the top