Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311359 - [All Diagrams] Delete and undo in model explorer does not restore the part
Summary: [All Diagrams] Delete and undo in model explorer does not restore the part
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 08:17 EDT by Vincent Hémery CLA
Modified: 2013-05-31 12:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.