|
Re: [CDO] CDOPackageRegistryImpl does not delegate to EMF global registry [message #423830 is a reply to message #423823] |
Tue, 07 October 2008 16:37 |
|
Hi ViK,
Have you already tried the Eager or Lazy subclasses of CDOPackageRegistry?
I think these should solve your problem.
Cheers
/Eike
Víctor Roldán Betancort schrieb:
> Hi guys,
>
> I've been having problems with (EMF globaly) registered packages.
> CDO prepares a ResourceSet by, among other things, adding it's own
> implementation of EPackage.Registry (CDOPackageRegistry).
>
> I'm trying to use a CDO-Prepared ResourceSet for both CDOResources and
> XMIResources. For the first one everything works fine because the
> CDO-Native package is properly registered. But when I try to get an
> XMIResource, the org.eclipse.emf.ecore.xmi.impl.XMLHandler is unable
> to find the proper package for my Legacy Package. This is
> understandable, since that package shouldn't be in the
> CDOPackageRegistry (at least not while we don't have Legacy support).
>
> But I wonder... why CDOPackageRegistryImpl does not delegate to EMG
> global registry? I modified the constructor to set the delegation, and
> everything works fine.
>
> public CDOPackageRegistryImpl()
> {
> delegateRegistry = EPackage.Registry.INSTANCE;
> }
>
> Is there a reason why this delegation is not being set?
> In case this shouldn't be done by default, is it possible to add a
> method to allow the client to specify the delegation?
>
> Cheers,
> ViK.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] CDOPackageRegistryImpl does not delegate to EMF global registry [message #423833 is a reply to message #423830] |
Tue, 07 October 2008 16:49 |
Victor Roldan Betancort Messages: 524 Registered: July 2009 |
Senior Member |
|
|
Eike,
I use Eager and it doesn't solve my problem :(
and I cannot use Lazy, since I need automatic CDO-Native package
registration.
I see that my ResourceSet's CDOViewSetPackageRegistryImpl delegates to
the session's PackageRegistry, but EagerPackageRegistry doesn't seem to
delegate to EPackage.Registry.INSTANCE. Furthermore, "delegateRegistry"
attribute is null.
Eike Stepper escribió:
> Hi ViK,
>
> Have you already tried the Eager or Lazy subclasses of CDOPackageRegistry?
> I think these should solve your problem.
>
> Cheers
> /Eike
>
>
> Víctor Roldán Betancort schrieb:
>> Hi guys,
>>
>> I've been having problems with (EMF globaly) registered packages.
>> CDO prepares a ResourceSet by, among other things, adding it's own
>> implementation of EPackage.Registry (CDOPackageRegistry).
>>
>> I'm trying to use a CDO-Prepared ResourceSet for both CDOResources and
>> XMIResources. For the first one everything works fine because the
>> CDO-Native package is properly registered. But when I try to get an
>> XMIResource, the org.eclipse.emf.ecore.xmi.impl.XMLHandler is unable
>> to find the proper package for my Legacy Package. This is
>> understandable, since that package shouldn't be in the
>> CDOPackageRegistry (at least not while we don't have Legacy support).
>>
>> But I wonder... why CDOPackageRegistryImpl does not delegate to EMG
>> global registry? I modified the constructor to set the delegation, and
>> everything works fine.
>>
>> public CDOPackageRegistryImpl()
>> {
>> delegateRegistry = EPackage.Registry.INSTANCE;
>> }
>>
>> Is there a reason why this delegation is not being set?
>> In case this shouldn't be done by default, is it possible to add a
>> method to allow the client to specify the delegation?
>>
>> Cheers,
>> ViK.
|
|
|
Re: [CDO] CDOPackageRegistryImpl does not delegate to EMF global registry [message #423856 is a reply to message #423833] |
Wed, 08 October 2008 07:47 |
|
Víctor Roldán Betancort schrieb:
> Eike,
>
> I use Eager and it doesn't solve my problem :(
> and I cannot use Lazy, since I need automatic CDO-Native package
> registration.
>
> I see that my ResourceSet's CDOViewSetPackageRegistryImpl delegates to
> the session's PackageRegistry, but EagerPackageRegistry doesn't seem
> to delegate to EPackage.Registry.INSTANCE. Furthermore,
> "delegateRegistry" attribute is null.
CDOViewSetPackageRegistryImpl and CDOPackageRegistryImpl are completely
different and not comparable.
I know once we had the possibility to set a delegate registry.
Unfortunately I can't remember anymore the reason that led to removal of
this support. Usually I'm not a fan of the EMF global package registry
because we can't control it exclusively but maybe now that we have the
external refenrences feature it makes sense again to allow delegation to
the global registry.
Vik, can you please file a Bugzilla so that I can investigate how to
enable this (allow it only before the session is opened or even after that)?
Cheers
/Eike
>
> Eike Stepper escribió:
>> Hi ViK,
>>
>> Have you already tried the Eager or Lazy subclasses of
>> CDOPackageRegistry?
>> I think these should solve your problem.
>>
>> Cheers
>> /Eike
>>
>>
>> Víctor Roldán Betancort schrieb:
>>> Hi guys,
>>>
>>> I've been having problems with (EMF globaly) registered packages.
>>> CDO prepares a ResourceSet by, among other things, adding it's own
>>> implementation of EPackage.Registry (CDOPackageRegistry).
>>>
>>> I'm trying to use a CDO-Prepared ResourceSet for both CDOResources
>>> and XMIResources. For the first one everything works fine because
>>> the CDO-Native package is properly registered. But when I try to get
>>> an XMIResource, the org.eclipse.emf.ecore.xmi.impl.XMLHandler is
>>> unable to find the proper package for my Legacy Package. This is
>>> understandable, since that package shouldn't be in the
>>> CDOPackageRegistry (at least not while we don't have Legacy support).
>>>
>>> But I wonder... why CDOPackageRegistryImpl does not delegate to EMG
>>> global registry? I modified the constructor to set the delegation,
>>> and everything works fine.
>>>
>>> public CDOPackageRegistryImpl()
>>> {
>>> delegateRegistry = EPackage.Registry.INSTANCE;
>>> }
>>>
>>> Is there a reason why this delegation is not being set?
>>> In case this shouldn't be done by default, is it possible to add a
>>> method to allow the client to specify the delegation?
>>>
>>> Cheers,
>>> ViK.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.23067 seconds