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

Bug 436833

Summary: EEF Bridge with Sirius should offer a better way to manage EEF adapters lifecycle
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: DiagramAssignee: Laurent Fasani <laurent.fasani>
Status: CLOSED FIXED QA Contact: Laurent Redor <laurent.redor>
Severity: normal    
Priority: P3 CC: alex.lagarde, cedric.brun, goulwen.lefur, laurent.redor, pierre-charles.david
Version: 1.0.0Keywords: triaged
Target Milestone: 3.0.0   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/33160
https://git.eclipse.org/r/47743
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=732a4f1cb1469d65364198a84dafb4b850b73850
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c158f08463784451a1f4320ef9050b91512b3dbe
Whiteboard:

Description Maxime Porhel CLA 2014-06-06 07:46:16 EDT
EEF add and remove to many adapters in the use with Sirius.
The bridge between EEF and Sirius should offer a better management of this lifecyle with an interaction with the Session for instance.
Comment 1 Alex Lagarde CLA 2014-06-19 08:50:38 EDT
Maxime: you could you please precise which are the installed adapters and how could sirius improve this mechanism ?

Missing a bit of information to accept this issue.
Comment 2 Goulwen Le Fur CLA 2014-06-23 09:01:55 EDT
Here we're talking about some adapters plugged by EEF on the ResourceSet.

The default stragegy applied by EEF plug adapters on the ResourceSet at the beginning of the editing and unplug them at the end.

Based on the Sirius session lifecycle, EEF can have a more efficient strategy.

I have given a patch to Maxime to improve the EEF/Sirius bridge. This patch modify the EEF strategy for take into account the session lifecycle.
Comment 3 Alex Lagarde CLA 2014-07-21 09:58:23 EDT
Ok thank you for these explanations Goulwen.

Maxime: can you provide the patch Goulwen mentionned through gerrit ?
Comment 4 Cedric Brun CLA 2014-09-10 04:15:44 EDT
I wrote a patch and pushed it on gerrit. Goulwen, Maxime, feel free to chime in if you think this is the wrong approach.

https://git.eclipse.org/r/#/c/33160/

Please note that this patch uses APIs from EEF 1.3 which was not part of Luna.
Comment 5 Pierre-Charles David CLA 2015-02-23 08:10:44 EST
(In reply to Cedric Brun from comment #4)
> I wrote a patch and pushed it on gerrit. Goulwen, Maxime, feel free to chime
> in if you think this is the wrong approach.
> 
> https://git.eclipse.org/r/#/c/33160/
> 
> Please note that this patch uses APIs from EEF 1.3 which was not part of
> Luna.

EEF 1.3 is part of Luna (and Kepler before that); it's 1.4 which was planned for Luna but missed the deadline and was released afterwards out of a SimRel.
Comment 6 Pierre-Charles David CLA 2015-05-07 09:27:34 EDT
As part of this one, we'll bump our minimum required version of EEF from 1.2 currently to 1.5. There should be minimal impact on existing users, and EEF 1.5 has no incompatible changes wrt to 1.2, and should not require even re-executing the EEF generators.
Comment 7 Eclipse Genie CLA 2015-05-12 11:06:13 EDT
New Gerrit change created: https://git.eclipse.org/r/47743

WARNING: this patchset contains 28530 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 8 Laurent Fasani CLA 2015-05-13 04:22:54 EDT
To test this enhancement, do the following steps.
* start eclipse in debugging mode
* create a modeling project with org.eclipse.sirius.tests.sample.docbook model.
* create a diagram and some semantic objects
* select an semantic object in diagram then another => check that unregisterEditingSemanticListener(PropertiesEditingSemanticListener) method is called in org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent.deactivate()
* close project => check that in org.eclipse.sirius.eef.listeners.EEFSessionManagerListener.notifyRemoveSession(Session) is called
Comment 11 Laurent Fasani CLA 2015-05-19 10:54:40 EDT
resolved
cf comment #8 for test scenario
Comment 12 Laurent Redor CLA 2015-05-21 10:26:51 EDT
Verified with Sirius 3.0.0 rc1

P.S.: docbook edit and editor projects are not bundled yet. You must import them from git repository.
Comment 13 Pierre-Charles David CLA 2015-06-24 11:14:15 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.