Created attachment 280571 [details]
Result after deletion
This bug is also true if the deletion occurs from the aird editor. New Gerrit change created: https://git.eclipse.org/r/152337 In pure Sirius environment (no team), it appears that the symptoms are slightly differents. In that case, after the deletion the editor is closed and the semantics element are deleted. However it raises 2 NPE ------------------------------ java.lang.NullPointerException at org.eclipse.sirius.diagram.business.api.query.ToolSectionQuery.getOperationActions(ToolSectionQuery.java:83) ------------------------------- and ------------------------------- java.lang.NullPointerException at org.eclipse.sirius.diagram.business.api.query.ToolSectionQuery.getOperationActions(ToolSectionQuery.java:83) ------------------------------- This behavior is not reproduce when the step to reproduce are written in JUnit plugin test Created attachment 280697 [details]
NPE1
Created attachment 280698 [details]
NPE2
New Gerrit change created: https://git.eclipse.org/r/153017 After investigation it appears that the 2 problems coexist. The same manipulation has a different outcome depending on the bundles available in the platform. In pure Sirius environment only the NPE appears. If the running platform has extra plugins such as (Collab or CDO native plugins) the first problem appears. A possible expplaination is that the order of registration of the ResourceSet listeners differs in the 2 cases. As such the way the target feature of the DRepresenationDescriptor is unset differs. In one case it is removed by unsetting the feature whereas in the other the feature is set to null. In order to handle both case, the 2 events sould be catched to close the editor. See: https://git.eclipse.org/r/153017 [552839] Catch new events to close the opened editor on deletion Gerrit change https://git.eclipse.org/r/153017 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=be8a21ba0b76db52e9a8ae1915516d5ce57a2b86 New Gerrit change created: https://git.eclipse.org/r/154035 Gerrit change https://git.eclipse.org/r/152337 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8ec1596af6caca26d68bd7e5430c311c11e6d735 Gerrit change https://git.eclipse.org/r/154035 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ada6fb823f10da2fef07b6c435d4ef2332315af4 New Gerrit change created: https://git.eclipse.org/r/154416 Gerrit change https://git.eclipse.org/r/154416 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7fad2af245a7082b01ab95007b547f0534459761 Validated with Sirius 6.3.1.202003201424 Available in Sirius 6.3.1 (part of Eclipse 2020-06). See https://wiki.eclipse.org/Sirius/6.3.1 for details on the release. |
Created attachment 280570 [details] ProjectToReproduce When a "Delete from the model" action ends by deleting the container of the semantic target of the current opened editor representation, the session seems broken. Here are the list of the following symptoms: * The editor is still open * There is no * inidcating that the session is dirty * The semantic elements are removed but the representation descriptor remains (see screenshot) * Moving elements in the opened editor ends up with: Caused by: java.lang.NullPointerException at org.eclipse.emf.transaction.RecordingCommand.getActiveTransaction(RecordingCommand.java:250) The expected behavior would be: * The editor should be closed * The representation should be properly deleted * The semantic elements should be properly deleted To reproduce: * Import "org.eclipse.sirius.sample.ecore.design" * Launch a runtime * Import the provided project (see attachment) * Open the unique diagram * In the opened editor select the package "P1_1_1" and use the action "Delete from model"