Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Unsettable enum handling(Serializer calling isSet())
Unsettable enum handling [message #698484] Tue, 19 July 2011 14:41 Go to next message
Balazs Varnai is currently offline Balazs VarnaiFriend
Messages: 21
Registered: June 2011
Junior Member

Consider the following grammar

enum DirectionEnum:
	in | inout | out;

	direction=DirectionEnum name=ID;

I populate the model as

Parameter param = DslFactory.createParameter();

/* */

During serialization isSet() is called, which in turn checks if the 'direction' is set to default, if so returns unset. This causes to serializer to fail immediately, since it's mandatory?

Any suggestion?

Re: Unsettable enum handling [message #699095 is a reply to message #698484] Wed, 20 July 2011 20:12 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13930
Registered: July 2009
Senior Member

the problem is the missing name, not the direction or enum Wink

for the strage error message

Exception in thread "main" java.lang.RuntimeException: foo bar
Semantic Object: Parameter

i filed
for the strage error message


Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:[Xbase] FeatureCall Scoping problems with DomainModelExample
Next Topic:View source for org.eclipse.emf.mwe2.runtime.workflow.Workflow
Goto Forum:

Current Time: Sun May 09 14:35:42 GMT 2021

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

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

Back to the top