Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 449357

Summary: AirdResourceImpl (and org.eclipse.sirius) should not depend on GMF
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: CoreAssignee: Mickael LANOE <mickael.lanoe>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: belqassim.djafer, esteban.dugueperoux, mickael.lanoe, steve.monnier
Version: 1.0.0Keywords: triaged
Target Milestone: 3.0.0M6   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/43590
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3e7f5ad187ff0e6f42e37c317503ea8a21f4faae
https://git.eclipse.org/r/58152
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=73704c2772d28b059121a51e9b67462eb4fea6b0
Whiteboard:

Description Pierre-Charles David CLA 2014-10-30 09:52:15 EDT
This is a followup to bug 431359.

Currently AirdResourceImpl is defined in org.eclipse.sirius, but inherits from GMFResource (for historical reasons). This core plug-in should not depend on implementation details of a specific dialect (diagrams), and should not impose a dependency on GMF (even if just org.eclipse.gmf.runtime.emf.core).

We should rewrite AirdResourceImpl to be independent on GMF, and remove the dependency at the bundle level.
Comment 1 Esteban DUGUEPEROUX CLA 2014-10-30 10:00:23 EDT
A detail of GMFResource is that it use UUID, i.e. useUUIDs() call return true, consequently all detached objects and its content are stored in XMLResourceImpl.DETACHED_EOBJECT_TO_ID_MAP. When many objects are removed from aird resource, then it will yet consume memory, then removing this inheritence between AirdResourceImpl and GMFResource is good for memory footprint.

The drawback is that we lose the ability to use "XMLResource.getID(EObject)" and "XMLResource.setID(EObject, id)" methods. In our Sirius based product, we use these methods to keep same IDs in a export/import process by using a tracability model.
Comment 2 Esteban DUGUEPEROUX CLA 2014-11-24 09:13:19 EST
A draft has been submitted to Gerrit about XMLResourceImpl.DETACHED_EOBJECT_TO_ID_MAP : https://git.eclipse.org/r/#/c/36918/ .
Comment 3 Eclipse Genie CLA 2015-03-10 12:21:30 EDT
New Gerrit change created: https://git.eclipse.org/r/43590
Comment 4 Mickael LANOE CLA 2015-03-12 09:14:38 EDT
Since GMFResource and GMFHandler classes are no longer used in Sirius with the proposed patch, these following methods are not called anymore:

- GMFResource.getEObject(String)
- GMFResource.setURI(URI) 
- GMFResource.basicSetResourceSet(ResourceSet, NotificationChain)
- GMFHandler.validateCreateObjectFromFactory(EFactory, String, EObject, EStructuralFeature)
- GMFHandler.endDocument()

All existing tests run successfully, nevertheless, these methods may be backported if new regressions are detected.
Comment 6 Pierre-Charles David CLA 2015-03-16 04:38:35 EDT
Fixed.
Comment 7 Belqassim Djafer CLA 2015-04-10 11:28:38 EDT
Verified as technical issue
Comment 8 Pierre-Charles David CLA 2015-06-24 11:15:49 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.
Comment 9 Eclipse Genie CLA 2015-10-14 08:45:31 EDT
New Gerrit change created: https://git.eclipse.org/r/58152