Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] Issue with serialisation code in Generic Editor
[EMF Forms] Issue with serialisation code in Generic Editor [message #1775997] Thu, 09 November 2017 00:01 Go to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
I have a model A that includes elements from a model for open street map (OSM). The OSM model is based on an XML schema, uses an XMLResource and Extended meta data to support XML attribute names that differ from the feature. E.g. the GeoLocation class has attributes "latitude" and "longitude", but when serialized in an XMLResource the XML attributes "lat" and "lon" are used.

Model A uses the standard XMIResource and XMI serialisation, so when a GeoLocation is contained in such a resource it is serialized with "latitude" and "longitude" attributes. At least that is the behaviour of the Sample Reflective Ecore Editor. However, the Generic Editor serialises the same resource using "lat" and "lon" attributes for the GeoLocation, hence the model cannot be read by the Sample Reflective Ecore Editor, nor the Sirius diagram editor. In the debugger, I see that the defaultSaveOptions of the XMIResource includes EXTENDED_META_DATA=org.eclipse.emf.ecore.util.BasicExtendedMetaData@7249d9ce, which seems to indicate it is meant so support XML. But I don't understand how and why this option get there.
Re: [EMF Forms] Issue with serialisation code in Generic Editor [message #1775998 is a reply to message #1775997] Thu, 09 November 2017 00:17 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
I've investigated this further and found that the GenericEditor sets the load option XMLResource.OPTION_RECORD_UNKNOWN_FEATURE to Boolean.TRUE and this somehow makes the loading process set the EXTENDED_META_DATA save option. If I clear the load options in the debugger, this does not happen.

I suggest that GenericEditor does not set the XMLResource.OPTION_RECORD_UNKNOWN_FEATURE option to TRUE, so this side-effect is avoided.
Re: [EMF Forms] Issue with serialisation code in Generic Editor [message #1776005 is a reply to message #1775998] Thu, 09 November 2017 07:13 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you can identify that the GenericEditor load options are different to the Sample Ecore Editor, please raise a Bugzilla with a repro since it may depend on your Resource's default load options.

Regards

Ed Willink
Re: [EMF Forms] Issue with serialisation code in Generic Editor [message #1776402 is a reply to message #1776005] Thu, 16 November 2017 08:14 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 111
Registered: September 2016
Senior Member
Hi Hallvard,

thanks for debugging this. Could you indeed kindly report a bug for this?

Thanks and best regards,
Jonas


--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:editor.getEditorInput()
Next Topic:Toolbar actions for GenericEditor
Goto Forum:
  


Current Time: Fri Mar 29 00:48:48 GMT 2024

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

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

Back to the top