Bug 474605

Summary: DialectEditorCloser should be reloaded on SessionListener.REPLACED event
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: esteban.dugueperoux
Version: 2.0.5Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Maxime Porhel CLA 2015-08-10 08:37:52 EDT
Steps to reproduce: 
 . Modify final int dialectEditorCloserExpectedDetections = deleteSemantic ? 4: 3 into final dialectEditorCloserExpectedDetections = 4 in l273 of SpecificClosedOrNotClosedEditorTest.
 . Launch SpecificClosedOrNotClosedEditorTest.testSpecificCloseEditorsFromSemanticDeleteAfterReload()
 . it fails

It simulates a reload of the aird and a programmatic representation deletion (our delete actions in the model explorer close the open impacted editors before the deletion).

We could improve the correction done on master for Bug 473944:
 . instead of doing the proxy resolution only in setFocus() for tree and table, we could call it from AbstractDTreeEditorSessionListenerDelegate as it detect the SessionListener.REPLACED event. 
 . we could do the same from DDiagramEditorSessionListenerDelegate, but for diagram, if the aird has been replaced this means to at least detach and re-attach the editor to the ui session to make the DialectEditorClose "resolve" its notification filter key. 
 . We could also update the dialect editor closer mechanism to display only one 'the root element has been deleted, representations will close" popup when there are several  representions targeting the same semantic element.