将项目移动到 Eclipse 中的另一个文件夹

发布于 2024-09-14 03:08:16 字数 396 浏览 1 评论 0原文

我通常将工作项目放在桌面上的文件夹中。当它们完成后,我只需将它们移动到c:\dev\。问题是我正在以一种相当古老的方式做这件事。

1. move project files
2. delete project on Eclipse
3. create new project on Eclipse on the new location

你们如何移动项目?

如果我可以更改:文件 ->属性->资源->位置路径就非常简单了!

示例动作:

c:\user\desktop\project_123
c:\dev\project_123

I generally have my working projects sitting on folders on my Desktop. When they are completed I just move them to a c:\dev\. The thing is I'm doing it in a rather archaic way.

1. move project files
2. delete project on Eclipse
3. create new project on Eclipse on the new location

How to you guys move projects around?

If I could alter the: File -> Properties -> Resource -> Location path it would be dead simple!

Example move:

c:\user\desktop\project_123
c:\dev\project_123

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

別甾虛僞 2024-09-21 03:08:16

右键单击 Package Explorer 中的 Eclipse 项目,选择 Refactor,然后选择 Move... 在出现的对话框中,输入或导航到新位置,然后单击 OK。这还将保留您的 CVS 或其他 SCM 元数据,但也会带来您的所有修改,并且您不会丢失工作集、启动配置或 Eclipse 与您的项目关联的其他内容中的任何成员身份。

Right click on the Eclipse project in the Package Explorer, select Refactor, then select Move... In the dialog that comes up, enter or navigate to the new location and click OK. This will also preserve your CVS or other SCM metadata, but will also bring all your modifications as well, and you won't lose any memberships in Working Sets, launch configurations, or other things that Eclipse associates with your project.

黎夕旧梦 2024-09-21 03:08:16

使用 Eclipse 的 Move 菜单项

打开 Navigator 视图,右键单击您的项目,然后单击 Move。然后选择目标目录。

Navigator View > Right Click > Move

请注意,它似乎在 Package Explorer 中不起作用(至少在 Neon 中不起作用)。 Package Explorer 中的移动对话框有所不同,因此请使用 Navigator 窗口。

输入图像描述此处

在此处输入图像描述

Use Eclipse's Move menu item

Open Navigator view, right click on your project and click Move. Then select the destination directory.

Navigator View > Right Click > Move

Note it doesn't seem to work in Package Explorer (at least not in Neon). The move dialog from Package Explorer is different, so use the Navigator window.

enter image description here

enter image description here

小瓶盖 2024-09-21 03:08:16

我不知道自这篇文章发布以来 eclipse 是否进行了修改......
就我而言,我手动移动了一个项目文件夹,并且我希望 Eclipse 在这个新位置打开该项目。这就是我所做的(而且似乎有效)。

  • (我正在使用 eclipse "helios" v 3.6.2)

  • 文件菜单 |导入...

  • 一般|将现有项目放入工作区

  • 选择根目录 = 新位置上项目的顶层目录

  • 完成

I don't know whether eclipse has made modifs since the date of this post...
In my case I had moved a project folder manually and I wanted Eclipse to open the project on this new location. This is what I did (and it seems to work).

  • (I'm using eclipse "helios" v 3.6.2)

  • File menu | Import ...

  • General | Existing projects into Workspace

  • Select root directory = top directory of your project on the new location

  • Finish

万水千山粽是情ミ 2024-09-21 03:08:16

我在 Eclipse 中很少有不受源代码控制的项目,因此我需要做的就是在新位置检查该项目。

如果您没有源代码控制,Eclipse 可以开箱即用地与 CVS 很好地配合,并且将 CVS 设置为在本地运行而无需服务器非常简单: http://www.tortoisecvs.org/faq.html#cvsinit

I rarely have any projects in Eclipse that aren't under source control, so all I would need to do is check the project out in the new location.

If you don't have source control, Eclipse works with CVS rather well out of the box, and it's pretty simple to setup CVS to run locally without a server: http://www.tortoisecvs.org/faq.html#cvsinit

﹎☆浅夏丿初晴 2024-09-21 03:08:16

右键单击您的项目 - >复制。

右键单击项目资源管理器的可用空间,然后右键单击->pase。

选择新文件夹和项目名称。

Right click on your project->copy.

right click in project explorer free space and right click->pase.

chose new folder and project name.

树深时见影 2024-09-21 03:08:16

当其他一切都失败时:

将 Eclipse 项目从一个目录(我们称之为 old_dir)复制到另一个目录(我们称之为 new_dir):

  1. 打开 Eclipse 并在 new_dir 中指定复制的工作目录。

  2. 一旦打开此 new_dir 中的项目,项目资源管理器选项卡下列出的项目可能仍然是 old_dir 中包含的项目(您可以通过右键单击每个项目并执行以下操作来检查它:“资源 -> 链接资源”查看路径变量值)。因此,必须将它们从该工作空间中移除。从 Project Explorer 选项卡中删除 Nios 2 应用程序项目和 BSP 项目,方法是右键单击它并选择删除选项,这将弹出一个新窗口。在弹出窗口中,确保取消选中“删除磁盘上的项目内容”复选框,然后单击“确定”删除项目。否则,它将从您复制项目的 old_dir 中删除它。

  3. 右键单击 Project Explorer 选项卡区域 → 导入 → 常规 → 将现有项目放入工作区,然后从 new_dir 添加复制的 Nios2 应用程序项目和 BSP 项目。

  4. 在Project Explorer选项卡区域右键→索引→重建,否则Nios2应用程序项目将无法使用BSP项目提供的包含文件。

  5. 单击“项目”→“清理”→“确定”以清理并重建整个项目。

  6. 当使用console与NIOS对话时,确保elf的路径也更新为新的项目目录!

WHEN EVERYTHING ELSE FAILS:

Copying an Eclipse project from one directory (let's call it old_dir) to another directory (let's call it new_dir):

  1. Open Eclipse and specify the copied working directory in your new_dir.

  2. Once it opens the project in the this new_dir, the projects listed under Project Explorer Tab might still be the ones contained in the old_dir (you can check it by right clicking each and following through: "Resource -> Linked Resource" to see the Path Variables values). Thus, they have to be removed from this work space. Delete the Nios 2 Application Project and the BSP Project from the Project Explorer Tab by right clicking on it and selecting Delete option which will pop a new window. In the pop-up window, make sure that the Delete project contents on disk check box is UNCHECKED before clicking OK to delete the Projects. Otherwise, it will delete it from the old_dir where you copied the project from.

  3. Right click in the Project Explorer Tab Area → Import → General → Existing Projects into Workspace and add the copied Nios2 Application Project and the BSP Project from the new_dir.

  4. Right click in the Project Explorer Tab Area → Index → Rebuild, otherwise the Nios2 Application Project will not be able to use the includes provided by the BSP Project.

  5. Click on Project → Clean → OK to clean and rebuild the whole project.

  6. When using console to talk to the NIOS, make sure elf's path is updated to the new project directory as well!

无远思近则忧 2024-09-21 03:08:16

我将整个项目复制到一个新目录。将 Eclipse 设置到新工作区后,它会立即识别该项目。因此,没有什么可做的。我使用面向 C/C++ 开发人员的 Eclipse IDE,版本 Luna Service Release 2 (4.4.2)。

I copied the whole project to a new directory. After setting Eclipse to the new workspace it recognises the project instantly. Thus it was nothing further to do. I use Eclipse IDE for C/C++ Developers, Version Luna Service Release 2 (4.4.2).

ぃ弥猫深巷。 2024-09-21 03:08:16

对于 Eclipse Oxygen,要移动 Java 项目,djb 接受的答案效果很好(根据我刚才的经验),除了阅读了 Basic 2012 年 5 月 14 日 9 点的评论: 27 号,我尝试将我的项目 XMLDiff 添加到 C:...\SVN\trunk\Internal Projects,但失败并显示了相当神秘的消息:

移动资源时遇到问题。

磁盘上已存在资源。

我必须通过在浏览对话框中创建一个新文件夹 XMLDiff 将项目移动到 C:...\SVN\trunk\Internal Projects\XMLDiff,结果是 C:...\SVN\trunk\Internal Projects \XMLDiff,而不是 C:...\SVN\trunk\Internal Projects\XMLDiff\XMLDiff。

所以这在 2012 年的 Basic 经验和 Eclipse.3 之间肯定发生了变化。

For Eclipse Oxygen, to move a Java project, djb's accepted answer works well (in my experience just now), except having read comment by Basic May 14 '12 at 9:27, I tried to add my project XMLDiff to C:...\SVN\trunk\Internal Projects, and I got a failure with the rather cryptic message:

Problems encountered while moving resources.

Resource already exists on disk.

I had to move the project to C:...\SVN\trunk\Internal Projects\XMLDiff by creating a new folder, XMLDiff, in the browse dialog, and the result was C:...\SVN\trunk\Internal Projects\XMLDiff, not C:...\SVN\trunk\Internal Projects\XMLDiff\XMLDiff.

So this must have changed between Basic's experience in 2012 and Eclipse.3.

白日梦 2024-09-21 03:08:16

对于 Eclipse Oxygen

项目属性 ->资源->链接资源 ->链接资源(选项卡)

For Eclipse Oxygen

Project Properties -> Resource -> Linked Resources -> Linked Resources (Tab)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文