[EMF] [CDO] Use MappedResourceLocator with CDO [message #1553029] |
Thu, 08 January 2015 13:08 |
|
Hi,
I think there is a problem to use MappedResourceLocator with CDO.
At the MappedResourceLocator creation, a EContentAdapter [1] is added on
the resource set. Then when a CDOResource is added to this resource set,
setTarget(Notifier) [2] is called, and then setTarget(EObject) [3] as
CDOResource is an EObject.
But the EContentAdapter of the MappedResourceLocator is not able to
handle this case. For example, there is ClassCast on line: URI newURI =
(URI)notification.getNewValue();
Is my analysis correct?
What are the options to use MappedResourceLocator with CDO? Indeed, this
would allow performance improvements.
Proposition: Override the setTarget(EObject) of
ResourceSetImpl.MappedResourceLocator.ResourceAdapter to change the
order bewteen EObject and Resource (same for unsetTarget).
[1]
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.MappedResourceLocator.ResourceAdapter
[2] org.eclipse.emf.ecore.util.EContentAdapter.setTarget(Notifier)
[3] org.eclipse.emf.ecore.util.EContentAdapter.setTarget(EObject)
Regards,
--
Laurent - Obeo
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.05306 seconds