Cannot Undo problem

Hi ! In my plugin I need to insert some lines in the code, and that part is working fine, the problem is that it breaks the "undo" (ctrl+z). Even more, it raises an error inside a popup that says: "Following files have changes that cannot be undone:"

Do I need to make something special before inserting code programmatically, so the undo functionality stills working?

Thanks !!

2 comments
Comment actions Permalink

Hi Enrique,

Try to perform the modification inside a callback given to the com.intellij.openapi.command.CommandProcessor.executeCommand().

Denis

1
Comment actions Permalink

it worked, thanks !!

0

Please sign in to leave a comment.