Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF] XMI loading option XMLResource.OPTION_DEFER_IDREF_RESOLUTION and "non unique" ERefer([EMF] XMI loading option XMLResource.OPTION_DEFER_IDREF_RESOLUTION and "non unique" EReference)
[EMF] XMI loading option XMLResource.OPTION_DEFER_IDREF_RESOLUTION and "non unique" ERefer [message #1801362] Thu, 17 January 2019 13:33 Go to next message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 147
Registered: July 2009
Senior Member
Hi,

We use some ecore definitions with EReference having the property "unique=false".
We also use the option XMLResource.OPTION_DEFER_IDREF_RESOLUTION=true when loading from XMI file (for better time loading).

It seems that the both do not work well together -> when our EReference is valued with two references to the same object, xmi loading throws some IllegalValueException (caused by IndexOutOfBoundException in XMLHelperImpl#setValue(..) on list.move(..) call).

When i look into XMLHelperImpl#setValue(..), I see that exception would be avoided if the XMLHelperImpl.checkForDuplicates was not set to true because of OPTION_DEFER_IDREF_RESOLUTION option.... So beyond the exception thrown, i wonder why the option OPTION_DEFER_IDREF_RESOLUTION seems to force behavior as if "unique=true" for all EReference.. ?

( We finally succeded in XMI loading, with some post-processing which detects all the related IllegalValueException and fix model by straightforward "addUnique(..)" in order to get the whished multiple {source; target} references)

Regards,
Fabien.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
rue Nina Simone
44000 NANTES
----------------------------------------------------
Re: [EMF] XMI loading option XMLResource.OPTION_DEFER_IDREF_RESOLUTION and "non unique" ER [message #1801364 is a reply to message #1801362] Thu, 17 January 2019 14:34 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=89325

Regards

Ed Willink
Previous Topic:[EMF] Define values for attributes inherited from defining class
Next Topic:VSand: a game with Vulkan, EMF and JLink.
Goto Forum:
  


Current Time: Thu Mar 28 21:55:24 GMT 2024

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

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

Back to the top