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

Bug 462213

Summary: Uncontrol action breaks the semantic resources of the session
Product: [Modeling] Sirius Reporter: Laurent Fasani <laurent.fasani>
Component: CoreAssignee: Laurent Fasani <laurent.fasani>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: belqassim.djafer, laurent.redor, pierre-charles.david
Version: 2.0.0Keywords: triaged
Target Milestone: 3.0.0M6   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/43957
https://git.eclipse.org/r/43960
https://git.eclipse.org/r/43959
https://git.eclipse.org/r/43958
https://git.eclipse.org/r/43961
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=f26c2739fdad4a6a3a9d2cf718328972b9643f27
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5970f86a46468f349f844dd9a4d691c0239b447d
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=06869d533750ac258d9a673cbb5a263ba532aef7
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=f780e03d16eb296477df94d058a978af189f724b
Whiteboard:
Bug Depends on: 459237    
Bug Blocks:    
Attachments:
Description Flags
ConsumerAndLibrary.zip none

Description Laurent Fasani CLA 2015-03-16 06:50:17 EDT
Created attachment 251577 [details]
ConsumerAndLibrary.zip

The semantic resources of a session is wrong after an Uncontrol.

Steps to reproduce:
* Imports projects from ConsumerAndLibrary.zip
* Open session from lib.aird
* Open session from consumer.aird
* Expand consumer.aird to see the node libraryP1 (under lib.ecore)
* Control libraryP1 from lib.aird --> The node libraryRoot of consumer.aird is collapsed because it has been reloaded.
* Uncontrol libraryP1 from lib.aird --> *KO*: consumer.ecore has been removed from the semantic resource of consumer.aird.
Comment 1 Laurent Redor CLA 2015-03-16 06:59:12 EDT
+++ This bug was initially created as a clone of Bug #459237 +++
Comment 2 Eclipse Genie CLA 2015-03-16 13:37:46 EDT
New Gerrit change created: https://git.eclipse.org/r/43957
Comment 3 Eclipse Genie CLA 2015-03-16 13:37:47 EDT
New Gerrit change created: https://git.eclipse.org/r/43960
Comment 4 Eclipse Genie CLA 2015-03-16 13:37:48 EDT
New Gerrit change created: https://git.eclipse.org/r/43959
Comment 5 Eclipse Genie CLA 2015-03-16 13:37:49 EDT
New Gerrit change created: https://git.eclipse.org/r/43958
Comment 6 Eclipse Genie CLA 2015-03-16 13:37:51 EDT
New Gerrit change created: https://git.eclipse.org/r/43961
Comment 11 Laurent Fasani CLA 2015-03-20 04:31:31 EDT
Fixed
The fix proposed contains the following parts:
1 - Differanciate the remove model
 - from the command "remove model" in one hand (Scenario "Remove Model" command)
 - when receiving a DELETE notification in other hand which is the scenario of the bug.
In the latter case, the LRC will not be used to get the resources consuming the deleted resource avoiding cascading delete of the resource

2 - Disable proxy resolution when removing a resource from session to avoid recreating, at session save, an empty
resource that has been previously externally deleted.

3 - Fix the bad update of controlled resources

4 - Properly remove the semantic root from aird model tag


However this does not resolve the problem about the LocalResourceCollector because it is still badly updated when the session receive notification of delete or modification of used resource. This will be handle in bug 461602.
Comment 12 Belqassim Djafer CLA 2015-04-14 04:13:57 EDT
Verified on Sirius 3.0.0M6
Comment 13 Pierre-Charles David CLA 2015-06-24 11:16:08 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.