Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Enumeration type between ""
Enumeration type between "" [message #714326] Wed, 10 August 2011 10:30 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi,

I have generated my grammar from an ecore, i have an attribute that is type of enumaration, so the grammar is like so :
A returns A:
	{A}
	('action' '=' action=TrueFalse)?
    ;

enum TrueFalse returns TrueFalse:
	true = 'true' | false = 'false';

I need that the value of the "action" sould be displayed between "", so i tried
enum TrueFalse returns TrueFalse:
	true = '"true"' | false = '"false"';

but without any results, any ideas
Re: Enumeration type between "" [message #714331 is a reply to message #714326] Wed, 10 August 2011 10:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13883
Registered: July 2009
Senior Member
Hi,
i cannot reproduce this
maybe this is a value converter thing? how do the literals in the enum look like?
what is the error you get? which Xtext Version do you use?

~Christian


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

[Updated on: Wed, 10 August 2011 11:00]

Report message to a moderator

Re: Enumeration type between "" [message #714454 is a reply to message #714331] Wed, 10 August 2011 14:47 Go to previous message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi Christian,
i tried it it in xtext 1.0.1 but in the xtext 2.0.1 its working pretty fine
Thanks
Previous Topic:[xbase] value coercion
Next Topic:Creating Xtext project based on file name not file extension
Goto Forum:
  


Current Time: Fri Apr 16 00:54:06 GMT 2021

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

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

Back to the top