Manual rename project in eclipse workspace

I manually renamed the project to the workspace, and not using refactoring. I lost all the files from this project folder. However, a new folder was created with the name of the project, which I tried to rename with all the files that I lost from the original project folder, which I renamed. So, I copied all the files from the new renamed project folder back to the original project folder, which I renamed. But I can not find the files in this project source folder in eclipse.

+4
source share
1 answer

Go to the project folder, delete the .project and .classpath files and the .settings folder. They contain legacy Eclipse-specific metadata, so Eclipse cannot find your project.

Go back to Eclipse and go to File → New Project ... → Java Project

If it is stored in your workspace, simply enter a new path in the "Name" field; If it was not saved in your workspace, turn off "Use default path" and select the folder where your project is located.

Et voila! Eclipse will generate new metadata, and all your source / binary files will still be present.

+3
source

Source: https://habr.com/ru/post/1500623/


All Articles