Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Accessing DSL statement in generator class
Accessing DSL statement in generator class [message #1765312] Thu, 08 June 2017 10:28 Go to next message
Jim Reader is currently offline Jim ReaderFriend
Messages: 2
Registered: June 2017
Junior Member
hi,
When working in a generator class (extension of org.eclipse.xtext.generator.AbstractGenerator) with the model objects generated from a DSL, is it possible to access/build/work out the DSL statement that led to the objects being created?

Google and forum searches haven't come up with anything, but I'm rather a newbie to this so perhaps not using the correct terminology.

Thanks.
Re: Accessing DSL statement in generator class [message #1765361 is a reply to message #1765312] Thu, 08 June 2017 18:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
do you mean the text in the model? that is called node nodel and can be accessed via NodeModelUtils

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: Accessing DSL statement in generator class [message #1767830 is a reply to message #1765312] Tue, 11 July 2017 12:47 Go to previous message
Jim Reader is currently offline Jim ReaderFriend
Messages: 2
Registered: June 2017
Junior Member
Perfect, that is exactly what I was after. Thank you.
Previous Topic:Using File Name in DSL
Next Topic:mismatched input '"urn:ietf:params:xml:ns:yang:smiv2:SNMPv2-MIB"' expecting '"'
Goto Forum:
  


Current Time: Tue Sep 21 23:03:36 GMT 2021

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

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

Back to the top