Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » How to serialize default values with domain specific editor
How to serialize default values with domain specific editor [message #1696133] Fri, 22 May 2015 09:34 Go to next message
Thanh Liem Phan is currently offline Thanh Liem PhanFriend
Messages: 28
Registered: January 2015
Junior Member

I have created a metamodel in ecore format and then generated its editor.
Everything is fine but all default values are not saved in the output file.
For example :
- boolean attribute: isOptimization = false => it will not be saved
- double attribute: min = 1 => OK but min = 0 => it will not be saved.

In this case, it's important to save all the default values because the output file will be read by the third party application in C++, for example.

There's some posts discuss a solution of overriding the shouldSaveFeature in XMLSaveImpl:
but I couldn't figure out how to change the default behavior.

Do you have any idea?
Thanks for your help.
Re: How to serialize default values with domain specific editor [message #1701735 is a reply to message #1696133] Wed, 15 July 2015 09:51 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
There is an option which can be passed during the : XMLResource.OPTION_KEEP_DEFAULT_CONTENT news and articles on eclipse and eclipse modeling.
Previous Topic:Extending EcoreTools with new EAnnotation-based layers
Next Topic:Ecore diagram editor does not load when I click the (aird) file
Goto Forum:

Current Time: Sat Sep 19 06:22:25 GMT 2020

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

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

Back to the top