Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Unsettable enum handling(Serializer calling isSet())
Unsettable enum handling [message #698484] Tue, 19 July 2011 10:41 Go to next message
Eclipse UserFriend
Hi,

Consider the following grammar

enum DirectionEnum:
	in | inout | out;

Parameter:
	direction=DirectionEnum name=ID;


I populate the model as

Parameter param = DslFactory.createParameter();
param.setDirection(DirectionEnum.in);

/* resource.save(null) */


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?

Thanks!
Re: Unsettable enum handling [message #699095 is a reply to message #698484] Wed, 20 July 2011 16:12 Go to previous message
Eclipse UserFriend
Hi,

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 https://bugs.eclipse.org/bugs/show_bug.cgi?id=352672
for the strage error message

~Christian
Previous Topic:[Xbase] FeatureCall Scoping problems with DomainModelExample
Next Topic:View source for org.eclipse.emf.mwe2.runtime.workflow.Workflow
Goto Forum:
  


Current Time: Mon Jul 07 04:32:08 EDT 2025

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

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

Back to the top