Description
Hello!
I've been using pyecore and love it. I found a compatibility issue in pyecore 0.15.1 (and previous versions) when opening models created in eclipse, updating with pyecore, serializing with pyecore, and trying to re-open in Eclipse (EMF Ecore 2.22.0, EMF XML/XMI Persistence 2.16.0) while using and keeping uuid. I found two things and have tried the potential fixes which seem to work:
-
Eclipse is expecting that the id attribute not be xmi:id but just simply id on the tag.
Potential fix: in _go_across method in xmi.py > XMIResource , at line 416, change
xmi_id = f'{{{XMI_URL}}}id' to
xmi_id = 'id' -
Eclipse is expecting that id references start with # and not just be the id of the element
Potential fix: in in _build_path_from method in resource.py > Resource, at line 580, change...
return (obj._internal_id, False) to
return ('#' + obj._internal_id, False)
With the potential fixes above the models load in eclipse without issue. Thanks again for your effort in the pyecore project!