简体   繁体   English

如何在Eclipse中编辑工作区的位置?

[英]How can I edit the location of the workspace in Eclipse?

Due to me being a novice before, I didn't understand what a workspace was. 由于我以前是新手,所以我不了解工作空间是什么。 I thought there would be one workspace for each project. 我认为每个项目都会有一个工作区。 I placed my workspace in the folder of the project I was working on. 我将工作空间放置在我正在处理的项目的文件夹中。 Is there any way I can change the file location of my workspace, so that I don't have it in the folder of the first project, and instead someplace nicer, like the root folder of my programming folder? 有什么办法可以更改工作空间的文件位置,以使它不在第一个项目的文件夹中,而是在更好的地方,例如我的编程文件夹的根文件夹中吗?

There should be an option under the File option in the menu to change the workspace. 菜单中“文件”选项下应有一个选项可以更改工作区。

File > Switch Workspace 文件>切换工作区

在此处输入图片说明

To move a workspace, you simply move its folder. 要移动工作区,只需移动其文件夹。

However, it seems you have projects in the workspace that are not in the workspace's folder. 但是,似乎您在工作区中有不在工作区文件夹中的项目。 In this case, you could move the projects as needed to create the desired folder hierarchy then move the workspace to the desired location. 在这种情况下,您可以根据需要移动项目以创建所需的文件夹层次结构,然后将工作空间移动至所需的位置。 To move a project, select it the project and use the Refactor | 要移动项目,请选择该项目并使用“重构” |“项目”。 Move menu command. 移动菜单命令。

Another option would be to delete the workspace (by deleting it's hidden .metadata subfolder) and creating a new one. 另一种选择是删除工作空间(通过删除隐藏的.metadata子文件夹)并创建一个新的工作空间。 You'd loose all your workspace settings, though. 但是,您将丢失所有工作空间设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM