Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Invalid proxy URI after unloading a resource
Invalid proxy URI after unloading a resource [message #1067947] Thu, 11 July 2013 11:54 Go to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,


I have an issue with the EMF Proxy URI when unloading a resource. The initial URI uses an XMI ID. When I unload the resource, the EObjects contained in this resource receive a proxy URI, which is different of their initial URI. The proxy URI is based on their "name" instead of their XMI ID.

When debugging a little bit, it seems that the eObjectToIDMap (And idToEObjectMap) are cleared *before* the proxy URI is set.

I'm not sure whether I'm missing an EMF Option or if this actually a bug.

The initial URI is:

platform:/resource/sample.emf.resource/model.uml#_nFcp4uofEeKtHNSvVQJLCA

And the Proxy URI for the same instance, after unloading the resource:

platform:/resource/sample.emf.resource/model.uml#//Package1/ModelClass


This becomes a problem when reloading a resource after an external change, because if the change was a Name modification, the proxy URI cannot be resolved anymore.


I'm working on a reproducible test case.


Thanks,
Camille


Camille Letavernier
Re: Invalid proxy URI after unloading a resource [message #1067954 is a reply to message #1067947] Thu, 11 July 2013 12:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Camille,

Yes, please open a bugzilla. I had a quick glance at the code, and
indeed, I'm concerned that
org.eclipse.emf.ecore.resource.impl.ResourceImpl.ContentsEList.inverseRemove(E,
NotificationChain) would remove the entries from the map. So likely
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doUnload() needs to make
a copy of the map and
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.getID(EObject) should
check if there is such a temporary copy much like
org.eclipse.emf.ecore.resource.impl.ResourceImpl.unloadingContents
tracks a temporary copy of the contents.


On 11/07/2013 1:54 PM, Camille Letavernier wrote:
> Hi,
>
>
> I have an issue with the EMF Proxy URI when unloading a resource. The
> initial URI uses an XMI ID. When I unload the resource, the EObjects
> contained in this resource receive a proxy URI, which is different of
> their initial URI. The proxy URI is based on their "name" instead of
> their XMI ID.
>
> When debugging a little bit, it seems that the eObjectToIDMap (And
> idToEObjectMap) are cleared *before* the proxy URI is set.
>
> I'm not sure whether I'm missing an EMF Option or if this actually a bug.
>
> The initial URI is:
>
> platform:/resource/sample.emf.resource/model.uml#_nFcp4uofEeKtHNSvVQJLCA
>
> And the Proxy URI for the same instance, after unloading the resource:
>
> platform:/resource/sample.emf.resource/model.uml#//Package1/ModelClass
>
>
> This becomes a problem when reloading a resource after an external
> change, because if the change was a Name modification, the proxy URI
> cannot be resolved anymore.
>
>
> I'm working on a reproducible test case.
>
>
> Thanks,
> Camille


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Invalid proxy URI after unloading a resource [message #1067957 is a reply to message #1067954] Thu, 11 July 2013 12:37 Go to previous message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
I've added a new bugzilla task:

412753: [Proxy URI] Invalid Proxy URI after unloading a Resource
https://bugs.eclipse.org/bugs/show_bug.cgi?id=412753

It contains a reproducible test case (With a UML model, but the behavior is the same for all XMI-ID based resources)


Regards,
Camille


Camille Letavernier
Previous Topic:[Xcore] derived containment
Next Topic:[CDO] cleaning corrupt entries in a CDOResource getContents()
Goto Forum:
  


Current Time: Thu Apr 18 16:05:49 GMT 2024

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

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

Back to the top