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

Bug 457265

Summary: Representation disappears from Model Explorer on session reload
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: CoreAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact: Maxime Porhel <maxime.porhel>
Severity: normal    
Priority: P3 CC: belqassim.djafer, esteban.dugueperoux, florian.barbin, laurent.redor, maxime.porhel
Version: 2.0.0Keywords: triaged
Target Milestone: 2.0.3   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=400891
Whiteboard:
Bug Depends on: 452681    
Bug Blocks:    

Description Laurent Redor CLA 2015-01-12 11:02:55 EST
+++ This bug was initially created as a clone of Bug #452681 +++

Using the attached example :

1. open My.ecore
2. Expand the My.ecore from Model Explorer to see the diagram under the root package.
3. In the My.ecore opened with the Sample Ecore Model Editor, copy and paste "c1" then save
4. Under My.ecore in Model Explorer, the root EPackage is collapsed and when you expand it the diagram does not appears. It appears only under the .aird hierarchy. We must close and reopen the Modeling Project to see again the diagram under root EPackage in Model Explorer or do another changes in the Sample Ecore Model Editor.
Comment 1 Laurent Redor CLA 2015-01-16 12:10:30 EST
Gerrit is available here: https://git.eclipse.org/r/39781
Comment 2 Maxime Porhel CLA 2015-01-16 12:16:02 EST
Fixed by commit 4ee7bdf1a94fddc934ea1deea627857eedd3e9a1 on v2.0.x branch
Comment 3 Belqassim Djafer CLA 2015-01-19 11:30:01 EST
KO on Sirius Stable pre-2.0.3 (2.0.3-S20150116-162634)
Comment 4 Maxime Porhel CLA 2015-01-19 11:31:33 EST
Belqassim, could you precise your errors ?
Comment 5 Belqassim Djafer CLA 2015-01-20 03:18:28 EST
(In reply to Maxime Porhel from comment #4)
> Belqassim, could you precise your errors ?

When I modified the semantic model by using the editor, the representation file dispears from the Model Explorer view after session reload (after saving the model).
Comment 6 Laurent Redor CLA 2015-01-20 03:53:13 EST
The fix is OK on Juno but is KO on Luna. There is probably a change in org.eclipse.emf.ecore.util.ECrossReferenceAdapter.
Comment 7 Laurent Redor CLA 2015-01-20 11:09:57 EST
Indeed, since the bugzilla 400891, the proxyMap is no longer used if the resolve() method returns true. In this case, we must iterate on all crossReferences to retrieve corresponding proxies.
Comment 10 Belqassim Djafer CLA 2015-01-21 10:57:42 EST
Validated on Sirius Stable pre-2.0.3 (2.0.3.201501210822)
Comment 11 Maxime Porhel CLA 2015-01-22 10:03:27 EST
Available in Sirius 2.0.3.