Community
Participate
Working Groups
The GMF Runtime EMF APIs must be aware of possible cross-resource containment structures in the models on which they operate. The following plug-ins should be swept: - org.eclipse.gmf.runtime.emf.clipboard.core - org.eclipse.gmf.runtime.emf.core to ensure that no assumptions are made about the object-resource relationships of any objects. In particular, usages of the following APIs must be revisited: EObject.eResource() - An EObject and its container do not necessarily have the same resource any more. EObject.eContainer() - An EObject and its container do not necessarily have the same resource any more. EObject.eContents() - May include objects from a different resource. EObject.eAllContents() - May include objects from a different resource. Resource.getContents() - May include children of objects from a different resource. Resource.getAllContents() - May include objects from a different resource.
Created attachment 39712 [details] Updates resulting from the sweep Attached a patch that addresses some assumptions about the object/resource relationships that are invalidated by cross-resource containment. In particular: - update the clipboard saving resource to save cross-resource contained objects in situ, not as proxies - update the copying resource to correctly obtain the IDs of objects from the resources that actually contain them, and to correctly determine whether an object is in the resource being copied or any of its children - ensure that an object removed from its container is also removed from its resource, if they are in different resources Also added some comments to explain why, in places, code that would resolve containment proxies is correct to do so.
Adding Vishy to cc: to review and (hopefully) commit the patch.
Reviewed and applied patch
[target cleanup] 1.0 RC was the original target milestone for this bug
[GMF Restructure] Bug 319140 : product GMF and component Runtime EMF was the original product and component for this bug