简体   繁体   English

Eclipse Java项目中的还原重构步骤

[英]revert back refactoring step in Eclipse Java project

I was refactored class name in a large java source code in Eclipse. 我在Eclipse中的大型Java源代码中重构了类名。 But in a situation where the refactoring produces any undesirable result, I would like to revered back to the previous class name or state of the code. 但是在重构产生任何不良结果的情况下,我想回到以前的类名或代码状态。 Is there a way to revert back to the previous class name in Eclipse? 有没有一种方法可以还原到Eclipse中以前的类名? Does it keep the versions of the refactoring stages? 它是否保留重构阶段的版本?

Normally you can achieve this by just pressing undo. 通常,您只需按撤消即可实现此目的。 If this is not possible for any reason Eclipse will warn you. 如果由于某种原因无法做到这一点,Eclipse将警告您。

In case of emergency: Revert by using your VCS :-) 紧急情况下:使用VCS还原:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM