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 !!

Comment actions Permalink

Hi Enrique,

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


Comment actions Permalink

it worked, thanks !!


Please sign in to leave a comment.