Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Two options in Editor but one in the model
Two options in Editor but one in the model [message #1080626] Tue, 06 August 2013 07:25 Go to next message
Dhanya M is currently offline Dhanya MFriend
Messages: 19
Registered: April 2013
Junior Member
Hello

I have a requirement to use one variable to store a value say bitLength. However at the editor side, there should be options bitLength or byteLength for the user.

If the user selects byteLength, the value has to be converted and stored into bitLength. ie. XCore defines only bitLength

How can this be acheieved?

Thanks.

Regards,
Dhanya
Re: Two options in Editor but one in the model [message #1080724 is a reply to message #1080626] Tue, 06 August 2013 10:09 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

depends if there is a syntax difference. then you could try to
change this with a valueconverter.

or you store both values and add a derived getter for the calculated value.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Xtext 2.4.2 ScopeProvider
Next Topic:Custom generator in MWE2 workflow with GrammarAccess
Goto Forum:
  


Current Time: Fri Apr 26 02:57:11 GMT 2024

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

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

Back to the top