即使我在Eclipse上重命名文件,我的项目文件系统名称仍然保持不变。 / p>
我应该在Eclipse上将文件系统上的项目重命名为相同吗?
解决方案如果项目使用使用默认位置复选框选中(表示项目在工作区目录中创建)复选框,则重命名项目似乎只会重命名底层文件系统目录。如果您创建项目并在工作区外部指定自定义位置,则在Eclipse 中重命名该项目不会重命名项目的主机目录。在这种情况下,您可能希望:
我很惊讶地学习到这一点(我用Eclipse 3.7进行了测试),但对我而言似乎是合乎逻辑的。这个想法是,工作区文件夹中的项目被认为是在Eclipse控制下,而不是位于文件系统任意位置的项目。
Should renaming a project in Eclipse also rename project folder on file system ?
My project file system name remains the same even when I rename the file on Eclipse.
Should I manually rename the project on the file system to same on Eclipse ?
解决方案It appears that renaming a project will only rename the underlying filesystem directory if the project was created with the "Use Default Location" checkbox selected (meaning the project is created in the workspace directory). If you create a project and specify a custom location outside the workspace, renaming that project in Eclipse does not rename the project's host directory. In that case, you'll probably want to:
I was surprised to learn this (I tested it with Eclipse 3.7), but it seems to be logical to me. The idea is that projects in the workspace folder are considered to be "under Eclipse control" as opposed to projects that are located in arbitrary places on your filesystem.
更多推荐
在Eclipse中重命名项目还会重命名文件系统上的项目文件夹?
发布评论