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

Bug 509970

Summary: The go to marker creates a new Sirius session
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: DiagramAssignee: Pierre Guilet <pierre.guilet>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: florian.barbin, laurent.redor, pierre-charles.david, pierre.guilet
Version: 4.1.0Keywords: triaged
Target Milestone: 5.1.2   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/121665
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=eed514a1d97259f0b6bb664b87e60fb5adc69ebd
Whiteboard:
Bug Depends on: 509300    
Bug Blocks: 534273    
Attachments:
Description Flags
vp1038.zip none

Description Maxime Porhel CLA 2017-01-05 05:08:15 EST
+++ This bug was initially created as a clone of Bug #509300 +++

When performing a go to marker, the DDiagramEditorImpl.getCorrectInput translates the FIleEditorInput into SessionEditorInput. But the method org.eclipse.sirius.ui.business.api.session.SessionEditorInput.create(URI) creates a new Sirius Session from the session resource URI each time the go to marker is executed. Those sessions are never closed.
Comment 1 Laurent Redor CLA 2018-04-20 11:43:19 EDT
This issue also causes problem of dead lock in "Team" mode.
Comment 2 Laurent Redor CLA 2018-04-20 11:45:15 EDT
Created attachment 273712 [details]
vp1038.zip

Steps to reproduce:
* Import project vp1038 from vp1038.zip. It contains data used in org.eclipse.sirius.tests.swtbot.GoToMarkerTraceabilityWithUserInteractionTest, plus a specific java services to get the number of sessions registered in the SiriusDiagramSessionEventBroker.
* Open session "\vp1038\models\vp1038.aird".
* Open the diagram named "diagram" (close the session editor if is is opened)
* Launch a validation with the contextual menu "Validate diagram" on the diagram.
* Open the "Interpreter" view.
* Evaluate the expression "aql:self.nbSessionsRegisteredinSiriusDiagramSessionEventBroker()" on the diagram
* The result is "1".
* Close the editor.
* Open the "Problems" view.
* Double-clic on the error "The namespace URI '' is not well formed"
* The diagram is reopened.
* Evaluate again the expression
* The result is "2" but it should be "1".
Comment 3 Eclipse Genie CLA 2018-04-24 09:59:47 EDT
New Gerrit change created: https://git.eclipse.org/r/121665
Comment 5 Pierre Guilet CLA 2018-05-31 05:21:37 EDT
Verified with OD CE 11 RC2
Comment 6 Pierre Guilet CLA 2018-05-31 05:46:19 EDT
Validated with OD CE 10.1.2 and not 11 RC2
Comment 7 Laurent Redor CLA 2018-06-28 12:11:21 EDT
Available in Sirius 5.1.2, see https://wiki.eclipse.org/Sirius/5.1.2 for details