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

Bug 491251

Summary: Isolate the dependency on EMF Transaction in Sirius
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: PropertiesAssignee: Pierre-Charles David <pierre-charles.david>
Status: CLOSED FIXED QA Contact: Florian Barbin <florian.barbin>
Severity: normal    
Priority: P3 CC: florian.barbin, laurent.fasani
Version: 3.1.0Keywords: triaged
Target Milestone: 4.0.0M7   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/70207
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=094df8768a5219d949711937864187cc8508b64b
Whiteboard:

Description Pierre-Charles David CLA 2016-04-07 09:41:21 EDT
Currently Sirius "leaks" its dependency on EMF Transaction (specifically, the need for a TransactionalEditingDomain) to the EEF 1.6 runtime. However it should be possible to use the EEF 1.6 runtime even in non-Sirius contexts which do not use EMF Transaction.

We should encapsulate this dependency on the Sirius side. The only actual requirements we have on the EEF side are:
1. a mean to execute operations which will have side-effects on the underlying model in a way that integrates with the "source" context (e.g. the editor from which the current input was selected);
2. a mean to detect changes in the EMF model which were done "outside" of the properties view while it is showing parts of that model, so that the view can react by refreshing itself and not show an out-of-date state.

Currently these are implemented using:
1. TransactionalEditingDomain.getCommandStack().execute(new RecordingCommand() {
     // The code to execute
   })
2. Registering a post-commit listener on the TED's ResourceSet.

Both mechanisms should be abstracted, and the TED-specific implementation provided by the Sirius side so that EEF only deals with the abstraction.
Comment 1 Eclipse Genie CLA 2016-04-08 04:03:03 EDT
New Gerrit change created: https://git.eclipse.org/r/70207
Comment 3 Pierre-Charles David CLA 2016-04-19 08:41:31 EDT
Fixed by https://git.eclipse.org/r/#/c/70206/ on the EEF side, and https://git.eclipse.org/r/#/c/70207/ in the Sirius side.
Comment 4 Florian Barbin CLA 2016-05-24 12:01:36 EDT
Nothing to verify. Technical issue
Comment 5 Pierre-Charles David CLA 2016-06-24 08:00:27 EDT
Available in Sirius 4.0.0.