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

Bug 537112

Summary: Subclasses of SaveSessionWhenNoDialectEditorsListener cannot provide their own SaveSessionJob
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: CoreAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: julien.dupont, sirius.core-inbox
Version: 5.1.2   
Target Milestone: 6.1.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/126263
https://git.eclipse.org/r/126261
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=93d7ad362ecd1cfa7d73021d48d9eb82cd023e7b
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d06a283bcbec85e73dcb8fa27d24a19264d2fd7d
Whiteboard:
Bug Depends on: 537111, 537150    
Bug Blocks:    

Description Maxime Porhel CLA 2018-07-17 10:36:39 EDT
+++ This bug was initially created as a clone of Bug #537111 +++

It is currently possible to provide a specific SaveSessionWhenNoDialectEditorsListener through the SaveSessionWhenNoDialectEditorsListener through the uiSessionFactory. 

However it is not possible to customize the SaveSessionJob triggered by this listener to save the session when the model change if the session was previously SYNC and if there is no open (Sirius) editors on the session. This behavior is enabled/disabled regarding the preference org.eclipse.sirius.ui.business.api.preferences.SiriusUIPreferencesKeys.PREF_SAVE_WHEN_NO_EDITOR.
Comment 1 Eclipse Genie CLA 2018-07-18 10:40:48 EDT
New Gerrit change created: https://git.eclipse.org/r/126263
Comment 2 Eclipse Genie CLA 2018-07-18 10:40:51 EDT
New Gerrit change created: https://git.eclipse.org/r/126261
Comment 5 Maxime Porhel CLA 2018-09-24 03:42:16 EDT
Steps to validate: 

It is now possible to override SaveSessionJob.performSave() and SaveSessionWhenNoDialectEditorsListener.createSaveSessionJob().
Comment 6 Maxime Porhel CLA 2018-10-09 05:31:58 EDT
Steps to validate:  

SaveSessionJob.performSave() and SaveSessionWhenNoDialectEditorsListener.createSaveSessionJob() must be protected and not private.
Comment 7 Pierre-Charles David CLA 2018-10-19 12:47:46 EDT
Available in Sirius 6.1.0, see https://wiki.eclipse.org/Sirius/6.1.0