Intellij IDEA 无法撤消
我正在 Intellij IDEA 从事一个项目。我搬家重构了一些包。但是我想撤消我的更改。当我点击恢复按钮时,它显示
无法撤消
,并在其下显示一个列表:
受此操作影响的以下文件已被更改
由于丢失了一些文件,我如何恢复我的更改包和类。 Intellij IDEA 是否将它们保存在临时文件夹中?
PS:我在64位Ubuntu计算机上使用open jdk 1.6.0。
I am working on a project at Intellij IDEA. I moved refactored some packages. However I want to undo my changes. When I click revert button it says
Cannot Undo
and shows a list under that:
Following files affected by this action have been already changed
How can I revert my changes because I lost some packages and classes. Does Intellij IDEA keeps them inside a temporary folder?
PS: I use open jdk 1.6.0 on a 64 bit Ubuntu computer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
IntelliJ IDEA 有一个很棒的功能,称为本地历史记录。我可以恢复我的更改。
有一个视频给出了详细的示例:http://www.jetbrains.com/idea/training/demos/local_history.html您可以从这里获取更多信息:http://jetbrains.com/help/idea/2016.1/using-local-history .html
IntelliJ IDEA has a great feature called as local history. I could revert my changes.
There is a video gives a detailed example for it:http://www.jetbrains.com/idea/training/demos/local_history.htmlYou can get more information from here: http://jetbrains.com/help/idea/2016.1/using-local-history.html
通过 VCS 撤消它 -->当地历史 -->显示历史。
Undo it through VCS --> Local History --> Show History.
当我开发 IntelliJ 插件 emacsIDEAs 时,我多次用谷歌搜索到这里,我会将我的解决方案留在这里,供有需要的人使用。
通常对文档的更改需要在runWriteAction中完成,
要撤消对文档的更改,需要在 CommandProcessor.getInstance().executeCommand 中调用,
因此解决方案是:在 runWriteAction 中调用 executeCommand,然后更改将是不可撤销的。
代码仓库: https://github.com/whunmr/emacsIDEAs
As I googled to here several times when I developing IntelliJ plugin emacsIDEAs, I will leave my solution here for someone who need it.
usually change to document need be done in runWriteAction,
and for undo changes to document need called in CommandProcessor.getInstance().executeCommand
so the solution is: call executeCommand in runWriteAction, then the changes will be undoable.
code repo: https://github.com/whunmr/emacsIDEAs