| Summary: | Isolate the dependency on EMF Transaction in Sirius | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Pierre-Charles David <pierre-charles.david> |
| Component: | Properties | Assignee: | 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.0 | Keywords: | 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: | |||
New Gerrit change created: https://git.eclipse.org/r/70207 Gerrit change https://git.eclipse.org/r/70207 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=094df8768a5219d949711937864187cc8508b64b 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. Nothing to verify. Technical issue Available in Sirius 4.0.0. |
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.