How to undo an IntentionAction
Hi,
is it possible to undo an IntentionAction? If so, what do I need to do to achieve this? Implementing both IntentionAction and UndoableAction within one class did not succeed.
Kind regards
Ansgar
Please sign in to leave a comment.
Hello Ansgar,
If your intention action modifies the source code, the changes will be undoable
using the standard undo infrastructure - no need to do anything else. If
your intention does something else like modifying some settings, you need
to call UndoManager.getInstance().undoableActionPerformed() during the course
of your intention execution.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"