开发者

Can I restore the files that I have deleted in Eclipse?

I'm working on eclipse and so开发者_StackOverflow社区metimes I have to delete some lines of code that indeed I prefer to backup on a notepad file (because I never know if that lines of code could be useful in another moment), so I have to select all the code I have to delete, ctrl+x, open a text editor, ctrl+v, and save it somewhere.

I was searching for a "code recycle bin plugin", so that I can select the code to trash, right click and "send to code recycle bin"; and in the future the deleted code is still there if I need it.


You can achieve a similar effect by configuring your workspace Local History settings:

Can I restore the files that I have deleted in Eclipse?


What I'm gathering from your question is that you often modify code in such a way that you're not sure if it will work after you modify it. What you need is a software versioning system.

Often, because a coder may introduce new code that is faulty or introduces unnecessary defects, we need to revert back to the last working version. There is an easier way than "Ctrl+X"ing the code and placing it in a "recycle bin" for future use. Try using a software versioning system such as Git for better results. The source code is available online, and you can get an account for free.

In short, version control system will stop you from having to juggle files unnecessarily.


There is something similar which will resolve your issue, the Eclipse Remus project. You can download the plugin via the Eclipse Marketplace. After installation you can open the Remus Navigation view in your Java perspective, select the code and drop the code into the Navigation-Structure of the Remus Navigation view. The dropped source-code will be saved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜