Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » need enum with some value
need enum with some value [message #1786232] Fri, 27 April 2018 10:52 Go to next message
shubhankar chowdhury is currently offline shubhankar chowdhuryFriend
Messages: 10
Registered: January 2018
Junior Member
I'm just begining with Xtext.

I want a rule in which if I provide :
" dataType unit8" in my file

I want a grammar in which will give a dropdown to choose unit8 and internally unit8 will have some path eg : /abc/xyz/

may be in grammar the enum should look like :
basicDataType : unit8='/abc/xyz/';

so when i generate a xml file from my text file it should have "/abc/xyz/unit8"
Re: need enum with some value [message #1786238 is a reply to message #1786232] Fri, 27 April 2018 13:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12230
Registered: July 2009
Senior Member
What do you mean by „generate a xml file „

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: need enum with some value [message #1786362 is a reply to message #1786238] Wed, 02 May 2018 06:06 Go to previous messageGo to next message
shubhankar chowdhury is currently offline shubhankar chowdhuryFriend
Messages: 10
Registered: January 2018
Junior Member
its just a file which is generated from my text
Re: need enum with some value [message #1786368 is a reply to message #1786362] Wed, 02 May 2018 07:48 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12230
Registered: July 2009
Senior Member
but then i dont understand your question. you can hardcode in your generator whatever you like

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:How can i override XTextBuilder ??
Next Topic:Formatting keywords
Goto Forum:
  


Current Time: Thu Sep 20 08:52:15 GMT 2018

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

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

Back to the top