Community
Participate
Working Groups
The following URL is valid and should deliver the first object in the resource: cdo://repo1/default1317589160531.acore_graphiti#/0 Likewise should do a call as the following resource.getEObject("/0"); Actually COD fails on this and delivers null.
Created attachment 204429 [details] Test v1 I attached a test to reproduce the issue.
Created attachment 204430 [details] Patch v1 And here comes the patch...
According to http://learning.infocollections.com/ebook%202/Computer/Programming/Java/Eclipse.Modeling.Framework/0131425420_ch13lev1sec2.html the URI fragment can be much more complex than the one you're using in the single test case. Will attach a more complex test in a minute...
Created attachment 204571 [details] Patch v2 (incl. test)
Created attachment 204829 [details] Test v3 I had some hard time finding the fix, because you had a nice typo in your test. it must be resource.getEObject("//@categories.0/@products.2"); and not resource.getEObject("//@categories.0/@product.2"); The missing 's' made it impossible to finde the correct feature ;) Attached the corrected version.
Created attachment 204830 [details] Patch v2 Here comes a fixe whcih basically bases on the ResourceImpl implementation.
(In reply to comment #5) > I had some hard time finding the fix, because you had a nice typo in your test. > it must be > > resource.getEObject("//@categories.0/@products.2"); > > and not > > resource.getEObject("//@categories.0/@product.2"); > > The missing 's' made it impossible to finde the correct feature ;) > Attached the corrected version. Oops ;-(
Created attachment 204832 [details] Patch v3 (combined) Sorry, the last patch contained to much. Applied a combined patch in the correct version.
Created attachment 204852 [details] Patch v4 I've removed the comment where you're asking if we should return "this" from getEObject() if uriFragment==null. I think that unnecessarily creates an incompatibility with EMF.
Please backport to 4.0 via bug 360380.
Committed revision 9470
Closing.