如何将eclipse(helios)项目移动到不同的工作区? [英] How to move an eclipse (helios) project to a different workspace?

查看:288
本文介绍了如何将eclipse(helios)项目移动到不同的工作区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,Eclipse不是我的本地IDE - 我几乎不是一个n00b。我在一个工作区中设置了一个项目,其实际上位于另一个客户端项目的目录中(我并没有真正关注整个工作区/项目的事情),实际上现在我甚至找不到打开的Eclipse工作区文件

First, Eclipse is not my native IDE -- I'm barely a n00b with it. I set up a project in a workspace that was actually in the directory of another client's project (I didn't really follow the whole workspace/project thing) and, in fact, now I can't even find the Eclipse workspace file to open it.

我想做的是:


  • 打开我的eclipse项目(/ workspace?) - 我知道所有文件在磁盘上,而不是打开什么,以便在Eclipse中看到它们,而

  • Open my eclipse project (/workspace?) -- I know where all the files are on disk, just not what to open in order to see them in Eclipse -- and

将我的项目移动到一个新的工作区,我想我将放入一个通用的Eclipse-y的地方,并且有一个工作区引用我所有的Eclipse项目。

Move my project to a new workspace, which I guess I will put in a generic Eclipse-y place, and have that one workspace reference all my Eclipse projects.

(这是正确的方法吗?Eclipse不喜欢我是一个单项目==一个工作室的人吗?)

(Is that the right way to do it? Does Eclipse dislike me being a one-project == one-workspace kind of guy?)

请教我关于Eclipse的方式,以便我可以重新编写代码。

Please educate me regarding The Eclipse Way so that I can get back to work writing code.

谢谢!

推荐答案

大致是一个工作区(这是一个目录)在Eclipse中包含:

Roughly a workspace (which is a directory) in Eclipse contains:


  • 配置(已安装JRE,服务器运行时,代码格式化规则,...)

  • 一个或多个项目

您当然可以拥有尽可能多的工作空间(但只能在一个时间),项目也可以是不同工作空间的一部分。

You can of course have as many workspaces as you want (but only one can be opened at a time) and a project can also be part of different workspaces.

如果您知道来源是什么,并希望将它们移动到新的工作区,这里是一个可能的解决方案:

If you know where your sources are and want to move them to a new workspace here is a possible solution:


  • 启动Eclipse,当提示工作区选择要创建工作空间的位置(如果目录不存在,则会创建它) )。例如,您可以选择C:/ Dev / Workspace /.

  • 如果没有提示,请转到文件 - >切换工作区 - >其他

  • 一旦您进入工作区,您可以使用File-> Import导入现有项目,然后将General-> Existing Projects导入工作区。

  • 浏览到包含项目源的文件夹,选择您的项目和点击完成

  • Start Eclipse and when prompted for a workspace choose where you want the workspace to be created (if directory doesn't exist it will be created). For example you can choose C:/Dev/Workspace/.
  • If you are not prompted, go to File->Switch workspace->Other
  • Once you are in your workspace you can import your exisiting project with File->Import then General->Existing Projects into workspace
  • Navigate to the folder containing your project sources, select your project and click finish

我不知道这是否是最佳做法,但我通常会做的是以下内容:

I don't know if it's a best practice or not but what I usually do is the following:


  • 我的每个客户都有一个工作空间(workspace_cust1,workspace_cust2)

  • 每个工作区引用我的公共图书馆项目并添加客户端特定项目

这样,每次更改我的公共库时,它在每个工作区中都是最新的。

This way each time I change my commons library it's up to date in every workspace.

这篇关于如何将eclipse(helios)项目移动到不同的工作区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆