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

Bug 311359

Summary: [All Diagrams] Delete and undo in model explorer does not restore the part
Product: [Modeling] Papyrus Reporter: Vincent Hémery <vincent.hemery>
Component: CoreAssignee: Project Inbox <mdt-papyrus-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: vincent.hemery
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Vincent Hémery CLA 2010-05-03 08:17:31 EDT
Steps to reproduce in class diagram :
- Create a class trough the palette.
- Save the diagram.
- Delete the class trough the model explorer
- Make undo on the root element of the model explorer

The class is recreated in the model explorer, but the figure is not restored. Moreover, the diagram is no longer dirty, since the command has been undone, yet it has been modified (figure has disappeared)

The problem comes from the fact that the org.eclipse.papyrus.diagram.common.editpolicies.OrphanViewPolicy executes the command in a post-commit context (notification from the modified EObject). Hence, its modifications are not recorded in the transaction and can not be undone.
Comment 1 Yann Tanguy CLA 2010-10-21 16:28:16 EDT
Should be fixed by using delete command provided by the Element Edit Service (bug324966).
Comment 2 Camille Letavernier CLA 2013-05-31 12:19:50 EDT
Works in the current version, I close this task.