Bug 522623 - 'Save all' command with Activity Explorer and Sirius editor open ends up with parallel saves
Summary: 'Save all' command with Activity Explorer and Sirius editor open ends up with...
Status: NEW
Alias: None
Product: Amalgam
Classification: Modeling
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-22 04:11 EDT by Arthur Daussy CLA
Modified: 2018-02-15 10:56 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Daussy CLA 2017-09-22 04:11:11 EDT
When using ‘Save All’ command with both an ActivityExplorer editor and a Sirius Diagram editor opened may result in a parallel saves. This is mainly problematic when custom actions are made during save because in that case they happen twice. 
 When calling this action on an open Sirius Editor the method “SessionSaveable.doSave(IProgressMonitor,IShellProvider)” is called resulting in the creation of a “SaveSessionRunnable” which is scheduled as a background job. On the ActivityExplorer editor the method “SessionSaveable.doSave(IProgressMonitor)” is called and the save action is done in the current thread. It results in having 2 save operations in parallel.
The best fix I can think of it by aligning the save behavior of the ActivityExplorer editor to a Sirius representation editor. To do so, the activity explorer has to implements the ISaveableSource interface. It means that saves we will be done in a background job as in Sirius. Using this implementation Eclipse is able to detect that both editors are doing the same save operation and execute only one.
Comment 1 Eclipse Genie CLA 2017-09-22 04:18:48 EDT
New Gerrit change created: https://git.eclipse.org/r/105595
Comment 3 Eclipse Genie CLA 2017-09-22 07:32:14 EDT
New Gerrit change created: https://git.eclipse.org/r/105610
Comment 5 Laurent Redor CLA 2017-10-05 09:41:12 EDT
In which version of Amalgam is this issue fixed?
Comment 6 Eclipse Genie CLA 2017-10-12 08:02:13 EDT
New Gerrit change created: https://git.eclipse.org/r/109907
Comment 8 Jeremy Aubry CLA 2017-10-13 04:19:58 EDT
Also, the implementation of ActivityExplorerEditor.doSave(IProgressMonitor) method must be removed because ActivityExplorerEditor implements ISaveablesSource. All saves will go through the ISaveablesSource / Saveable protocol (like org.eclipse.ui.navigator.CommonNavigator.doSave(IProgressMonitor)).
Comment 9 Eclipse Genie CLA 2017-10-17 04:41:00 EDT
New Gerrit change created: https://git.eclipse.org/r/110186
Comment 11 Eclipse Genie CLA 2017-10-17 09:00:34 EDT
New Gerrit change created: https://git.eclipse.org/r/110208
Comment 13 Eclipse Genie CLA 2018-02-15 06:43:58 EST
New Gerrit change created: https://git.eclipse.org/r/117426