在Eclipse中重命名项目还会重命名文件系统上的项目文件夹?

编程入门 行业动态 更新时间:2024-10-20 16:43:26
本文介绍了在Eclipse中重命名项目还会重命名文件系统上的项目文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 重命名Eclipse中的项目还要重命名文件系统上的项目文件夹?

即使我在Eclipse上重命名文件,我的项目文件系统名称仍然保持不变。 / p>

我应该在Eclipse上将文件系统上的项目重命名为相同吗?

解决方案

如果项目使用使用默认位置复选框选中(表示项目在工作区目录中创建)复选框,则重命名项目似乎只会重命名底层文件系统目录。如果您创建项目并在工作区外部指定自定义位置,则在Eclipse 中重命名该项目不会重命名项目的主机目录。在这种情况下,您可能希望:

  • 在Eclipse中重命名项目(将更新任何内部引用和.project文件)
  • 从Eclipse Workbench视图中删除项目(确保删除确认对话框中选择删除文件内容选项不 / />>
  • 重命名文件系统中的项目目录。
  • 将项目导入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:

  • Rename the project in Eclipse (which will update any internal references and the .project file)
  • Remove the project from your Eclipse Workbench view (making sure that the "Delete file contents" option is NOT selected in the delete confirmation dialog).
  • Rename the project's directory in your filesystem.
  • Import the project back into your Eclipse workspace.
  • 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中重命名项目还会重命名文件系统上的项目文件夹?

    本文发布于:2023-11-12 12:05:34,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1581459.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:重命名   项目   还会   文件系统   文件夹

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!