Bug 571889 - Removing a sub-aird file should not close the session but remove the analysis from the session
Summary: Removing a sub-aird file should not close the session but remove the analysis...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 6.4.1   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2021-03-11 11:07 EST by Steve Monnier CLA
Modified: 2021-03-11 11:17 EST (History)
1 user (show)

See Also:


Attachments
Sample_project_571889 (3.62 KB, application/x-zip-compressed)
2021-03-11 11:08 EST, Steve Monnier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Monnier CLA 2021-03-11 11:07:13 EST
In the modeling explorer view, deleting a semantic resource will automatically update the session (aird file) and remove it from the session. Deleting an aird will close the session. However, if the aird is not the main one, it should remove the referenced analysis from the session and have in fact a similar process to the semantic resource deletion.
This issue comes from org.eclipse.sirius.business.internal.session.ReloadingPolicyImpl.getActions(Session, Resource, ResourceStatus) in case DELETED, main aird and referenced aird should be processed differently.

Step to reproduce:
- Import the project in the attached archive
- Open the session
- Open representations.aird in a text editor. Line 4 and 5 you should see the referencedAnalysis and the semanticResources tab that references the sub aird and the ecore model.
- If you remove My.ecore, you will see that semanticResource tag has been removed as expected. Press ctrl+z to undo the deletion.
- Now delete My_newPackage1.aird -> KO the referencedAnalysis has not been removed. Also not that the session was closed, but it was not necessary. Furthermore, if you reopen the session it will work but reference a non existent aird file.
Comment 1 Steve Monnier CLA 2021-03-11 11:08:21 EST
Created attachment 285806 [details]
Sample_project_571889