Bug 474605 - DialectEditorCloser should be reloaded on SessionListener.REPLACED event
Summary: DialectEditorCloser should be reloaded on SessionListener.REPLACED event
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.5   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-08-10 08:37 EDT by Maxime Porhel CLA
Modified: 2015-08-26 11:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.