Community
Participate
Working Groups
Global undo / redo actions are able to be executed while one of these actions is currently running. If an undo action is currently running, and the EventLoop is run, then another undo is capable of being executed. When doing undo / redo quickly, I found that the command (in my case it was a Delete from model command) could end up on the OperationHistory undoList multiple times even though it was only executed once. I was then able to undo the same command many times in a row, which caused errors. I created a shared lock on the GlobalUndoAction and GlobalRedoAction doRun methods, which would skip the doRun if the lock could not be obtained, and this fixed my problem.
Created attachment 45600 [details] patch for org.eclipse.gmf.runtime.common.ui.action This is a patch of the lock I used to fix my problem. Maybe find a better way to disable the global undo / redo actions while currently executing.
Linda, can you code review ?
Reviewed, tested and committed the patch.
[GMF Restructure] Bug 319140 : product GMF and component Runtime Common was the original product and component for this bug