I have a project of eclipse that is located in some folder on my my local-disk. Let's say: c:\proj1.0 an开发者_StackOverflowd after a while I need to change the folder name to proj2.0 (why? because I started working on the next version of my application and I want to save the time of creating the new project in Eclipse. The older version is stored in the source control anyway)
How can I do it? if I try to change it than the project cannot be found by eclipse. I didn't find the eclipse configuration file where the absolute location of the project is defined.
You have to change the project's name from Eclipse. In the Package explorer Right-click the project -> Refactor -> Rename
. Or simply click on the project and press Alt + Shift + R
. This way no configuration will be lost.
Another way would be to move the project's folder by Right-clicking on the project > Refactor > Move
.
Alternatively, if you already renamed the folder's name and cannot see the project in Eclipse anymore, you can select File menu -> Import -> Existing projects into Workspace
, navigate to the parent folder of your project's folder, then select the projects you want to import and press Finish.
It sounds like you think the name of the project comes from the workspace folder. This is not the case. The project name is contained in a hidden .project file. The refactoring tools are probably a better way to go, but that doesn't seem to be what you want.
- Make new proj2.0 directory.
- Copy hidden .project and .classpath files from proj1.0 directory to proj2.0 directory.
- Edit .project in a plain text editor and change the name.
- In Eclipse, Import Existing Projects into workspace and point to the proj2.0 directory.
if you wish your Source folder some where else :
Right Click > Build Path > New Source Folder > Link Source >
then choose your Source file Location
and then Click
Finish
When you make Source file some where else out of your Eclipse project
then :
1st : You are able to have more than one project in Eclipse from same Source also
2nd : Save your time for transferring your source file with out Eclipse project
3rd : you wont delete your source file by the mistake when you delete Eclipse project
First I use Refactor/Move to rename my project folder's name. Then I use Refactor/Rename to change my project's name in Eclipse.
精彩评论