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

Bug 314252

Summary: [General] Undo/redo doesn't work for all commands
Product: [Modeling] Papyrus Reporter: Cedric Dumoulin <cedric.dumoulin>
Component: CoreAssignee: Project Inbox <mdt-papyrus-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cletavernier, papyrus-bugs, Patrick.Tessier
Version: 0.7.0   
Target Milestone: 0.7.0   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on: 314250    
Bug Blocks:    

Description Cedric Dumoulin CLA 2010-05-25 07:48:20 EDT
The undo redo work for some commands, but not for others.
This is because several CommandStack are used to execute commands. Only one commandStack is used for undo/redo.
If the command is executed on another commandStack, it doesn't appear in the list of undoable operations.
Comment 1 Toni Siljamäki CLA 2013-10-09 10:04:32 EDT
There are several bugs dealing with undo/redo.
Should they all be linked to this one?
Comment 2 Patrick Tessier CLA 2014-03-20 17:14:01 EDT
Cedric can you precise the context of the Undo command, which command?
Because of the number of commands that are exist or use. it is impossible to find and fixe this bugs.
Comment 3 Camille Letavernier CLA 2014-03-24 05:40:02 EDT
From what I've seen (At least until M6), undo/redo issues are usually not related to the command themselves, but to the various OperationHistory/CommandStacks.

The undo/redo handlers are properly implemented in the ModelExplorer, but they are different from the ones used in the core editor. Symptom: Undo/redo doesn't work anymore from the main editor. It works as expected when the ModelExplorer view is active.

Also, some user operations are not atomic. Symptom: a user operation needs to be undone two or three times before we get back to the initial state. This is especially the case for Stereotype manipulation.

I suggest closing this task (Which has been opened in 2010 and not updated since then). Specific tasks already exist, and are not related to this one.

See e.g. Bug 323016, Bug 385761 (Stereotypes), Bug 420557 (Undo/Redo handlers)