Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to limit the selection of enum literals?
How to limit the selection of enum literals? [message #1140875] Wed, 16 October 2013 17:22 Go to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hello everyone!
I just wanted to know if it is possible to limit the selection of enum literals?

Here an example:

enum VisibilityKind_Impl returns VisibilityKind:
	public='public' | private='private' | protected='protected' | package='package';


In some special cases, I just want to disable some selections for the user. So the user can just choose two out of four different literals. Is this possible in xtext?

Thx a lot,

Alex

Re: How to limit the selection of enum literals? [message #1140919 is a reply to message #1140875] Wed, 16 October 2013 18:02 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13661
Registered: July 2009
Senior Member
If you don't use a manually maintained metamodel: write a check and
(maybe) adopt content assist (completeKeyword if I remember correct)

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


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
Previous Topic:Changing Antlr build options in workflow?
Next Topic:Specific case-insensitive references
Goto Forum:
  


Current Time: Sun Nov 29 23:38:17 GMT 2020

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

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

Back to the top