| Summary: | Open menu entry is available on a deleted diagram | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Axel RICHARD <axel.richard> |
| Component: | Diagram | Assignee: | Laurent Fasani <laurent.fasani> |
| Status: | CLOSED FIXED | QA Contact: | Julien Dupont <julien.dupont> |
| Severity: | major | ||
| Priority: | P3 | CC: | julien.dupont, laurent.fasani, maxime.porhel, pierre-charles.david |
| Version: | 4.0.0 | Keywords: | triaged |
| Target Milestone: | 4.1.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/81990 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=83f70b06681b67b36fd4a2cb1c1ac7974249ae56 |
||
| Whiteboard: | backport | ||
| Bug Depends on: | 494766 | ||
| Bug Blocks: | |||
|
Description
Axel RICHARD
Reproduced on master branch for Sirius 4.1. Steps to reproduce: * Create a modeling project with an ecore model. * Activate the Design viewpoint from EcoreTools. * Create 2 diagram named A and B on the root EPackage. * Open A, * Create a subPackage on the diagram A * Create 3 diagrams C and D on the sub package. * From the model explorer, delete B and D diagrams * From the A editor, select the diagram background: B should not appear anymore in the Open menu. * From the A editor, select the subPackage, D should not appear in the Open menu. The bug currently also impact the corresponding Open menu in table and tree. And maybe also the Navigate menu. DialectManager.INSTANCE.getRepresentations(semantic, session) return deleted diagrams because the cross reference still find them. Note that DialectManager.INSTANCE.getRepresentationDescriptors(semantic, session) is ok. I see two corrections to do: . Correct the delete action/command and ensure that DialectManager.getRepresentations does not return deleted representations. We might need to complete the DanglingRefRemovalTrigger or to introduce/imporve the current DRepresentation/DRepresentationDescriptor mecanism . Improve the OpenMenuContribution/MenuHelper/DTableMenuListener/DTreeMenuListener/SubDiagramDecorator/ to use the DialectManger.getRepresentatonDescriptors api. The problem is that the ECrossreferenceAdapter is not removed from the deleted DRepresentation because the Drep is a root object of the resource. See #445761 that corresponds to that subject The proposal is to overload the selfAdapt method to removeAdapter when the notifier is a Resource New Gerrit change created: https://git.eclipse.org/r/81990 (In reply to Maxime Porhel from comment #2) > Steps to reproduce: > * Create a modeling project with an ecore model. > * Activate the Design viewpoint from EcoreTools. > * Create 2 diagram named A and B on the root EPackage. > * Open A, > * Create a subPackage on the diagram A > * Create 3 diagrams C and D on the sub package. > * From the model explorer, delete B and D diagrams > * From the A editor, select the diagram background: B should not appear > anymore in the Open menu. > * From the A editor, select the subPackage, D should not appear in the Open > menu. Additional steps: undo the diagrams' removal, and make sure they ara available again in the "Open" menus. Gerrit change https://git.eclipse.org/r/81990 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=83f70b06681b67b36fd4a2cb1c1ac7974249ae56 Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details. |