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

Bug 566349

Summary: Add a method to allow to start "cleaning" as soon as the close of an editor is requested (and not in async)
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: CoreAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact: Florian Barbin <florian.barbin>
Severity: normal    
Priority: P3 CC: florian.barbin
Version: 6.0.0   
Target Milestone: 6.4.0   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=566274
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/168086
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b1f430b5c982c5b6ddbb33afe8f57483599bb744
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/169645
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=a88f229dca2559ce39764e9db5e3ce54fa211ae2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=574889
Whiteboard:

Description Laurent Redor CLA 2020-08-25 03:48:02 EDT
When "org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.closeEditor(IEditorPart, boolean)" is called, the close of the editor is called in asyncExec by GMF (org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.close(boolean)).
In this situation, several notifications can be done bewteen the request of the close and the real close. These notifications can caused exceptions.

The goal of this issue is to add a method to allow to start cleaning as soon as the close of an editor is requested. For example, for diagram we want to dispose all the actions as soos as the close is requested (to avoid a refresh of these actions despite the editor closing is "in progress").

Example of problem: With Sirius used in a colaboratve mode (Team For Capella, Obeo Designer Team Edition), if the connection with the server is lost, the refresh of the actions caused a lot of LifecycleException (see bug 566274 for details). By disposing these actions as soon as the close is requested, these problems do not appear.
Comment 2 Eclipse Genie CLA 2020-09-21 04:08:49 EDT
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/169645
Comment 4 Florian Barbin CLA 2020-11-17 09:05:16 EST
Verified with Team for Capella
Comment 5 Pierre-Charles David CLA 2020-12-04 04:23:39 EST
Available in Sirius 6.4.0, see https://download.eclipse.org/sirius/updates/releases/6.4.0/ for details.