How to rename and modify multiple files as 1 history entry?
I'm doing a minor code conversion in my plugin. Basically I'm modifying the contents of the selected file, renaming this file and modifying a number of other files that import the current file. That's a number of different changes that may take a few seconds to execute. The issue is that I would love to be able to press the CTRL+Z in intellij to undo all the changes at one go. Using the Document instances to manage the content, builds the history entries, but as far as I understand I will get several history entries if I modify several documents, not to mention, that I cannot use a document to rename a file. For that I need a VirtualFile, but if I rename it this way, I'm not gonna get any history entry at all.
Please sign in to leave a comment.
Please see com.intellij.openapi.command.CommandProcessor
that helped! Thank you!