Personally, I think you should use Git or other version control tools to develop the habit of submitting versions when writing code, so that you can view the code in different periods. If you encounter a situation like yours, you can use it to restore to the time you have not modified or deleted it. It's time to file, of course the benefits of using version control tools don't stop there. In addition, there are plug-ins for Git or other version control tools that can be installed on eclipse. It is said that eclipse itself is not omnipotent. What makes it stand out is that it has many plug-ins.
There is something called Local History, but the default storage period seems to be one week. If it doesn't exceed this time, it should be found inside.
Right-click on the file, there will be a "local history" option among the following three options
Personally, I think you should use Git or other version control tools to develop the habit of submitting versions when writing code, so that you can view the code in different periods. If you encounter a situation like yours, you can use it to restore to the time you have not modified or deleted it. It's time to file, of course the benefits of using version control tools don't stop there. In addition, there are plug-ins for Git or other version control tools that can be installed on eclipse. It is said that eclipse itself is not omnipotent. What makes it stand out is that it has many plug-ins.
There is something called Local History, but the default storage period seems to be one week. If it doesn't exceed this time, it should be found inside.
Right-click on the file, there will be a "local history" option among the following three options