如何克隆 Eclipse 工作区
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4848767/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to Clone an Eclipse Workspace
提问by Zemzela
I am wondering how to create new clean Eclipse workspace but having all settings from an existing one. Maybe something like cloning but without projects?
我想知道如何创建新的干净的 Eclipse 工作区,但具有现有工作区的所有设置。也许像克隆但没有项目?
采纳答案by kostja
I use export->preferences->allthen change to a new workspace and importthe prefs. Works fine (though clearly not very comfortable). Unfortunately, eclipse only offers to copy the layout settings when changing workspaces which is not enough for most purposes.
我使用导出->首选项->全部然后更改为新的工作区并导入首选项。工作正常(虽然显然不是很舒服)。不幸的是,eclipse 只提供在更改工作区时复制布局设置,这对于大多数用途来说是不够的。
回答by xavier.seignard
You can have a look at the following plugin : http://code.google.com/a/eclipselabs.org/p/workspacemechanic/
您可以查看以下插件:http: //code.google.com/a/eclipselabs.org/p/workspacemechanic/
It's a plugin developed by google which lets you store your preferences and apply them to any workspace automatically.
这是一个由 google 开发的插件,可让您存储首选项并将其自动应用于任何工作区。
If you store it in your dropbox (or any other shared storage), you'll be able to share you preferences between all your computers and even between all your team members.
如果您将它存储在您的保管箱(或任何其他共享存储)中,您将能够在所有计算机之间甚至在所有团队成员之间共享您的首选项。
It's the best and most reliable solution for your problem.
它是解决您问题的最佳和最可靠的解决方案。
回答by Tod
My preferred method is to copy both the .settings
folder and the .launches
folder from the old workspace to the new workspace. This seems to do a more complete job than using the export preferences option. You can find both folders under your workspace starting at.metadata\.plugins
The .settings
folder can be found under the org.eclipse.core.runtime
folder
The .launches
folder is under the org.eclipse.debug.core
folder.
我的首选方法是将.settings
文件夹和.launches
文件夹从旧工作区复制到新工作区。这似乎比使用导出首选项选项做得更完整。您可以在开始你的工作空间下,这两个文件夹.metadata\.plugins
的.settings
文件夹,可以在下面找到org.eclipse.core.runtime
文件夹中的.launches
文件夹下org.eclipse.debug.core
的文件夹。
(Just one of many tricks covered in my two Eclipse Guided Tourvideo training courses on Pluralsight.)
(这只是我关于 Pluralsight 的两个Eclipse Guided Tour视频培训课程中涵盖的众多技巧之一。)
回答by Bozho
You can try copying the workspace/.metadata
folder. It mainly contains plugin information, and it is possible that you don't have some of the plugins. The specific folder that contains important settings is .metadata/.plugins/org.eclipse.core.runtime/.settings
. See this article
您可以尝试复制workspace/.metadata
文件夹。它主要包含插件信息,可能您没有某些插件。包含重要设置的特定文件夹是.metadata/.plugins/org.eclipse.core.runtime/.settings
. 看这篇文章
回答by Matija Han
No need to copy anything manually, use Workspace Preferences Transferrer- it works great. Here is the quote from the description:
无需手动复制任何内容,使用Workspace Preferences Transferrer- 效果很好。这是描述中的引用:
Extends the File > Switch Workspace… command with the option to transfer all preferences from the current workspace to the other one.
扩展“文件”>“切换工作区...”命令,其中包含将所有首选项从当前工作区转移到另一个工作区的选项。
Just search the Eclipse marketplace and install it from there.
只需搜索 Eclipse 市场并从那里安装它。
回答by san242
Need to copy .Metadata that holds the properties of your workspace.
需要复制包含工作区属性的 .Metadata。
回答by MSN
Best way is to copy the .metadata folder to a new folder and open that folder in Eclipse Workspace dialog box.
最好的方法是将 .metadata 文件夹复制到一个新文件夹并在 Eclipse Workspace 对话框中打开该文件夹。
回答by somenickname
Just copy the whole workspace on your local file system. That works for me because my new feature branch is got the same pom file and thus the overall build matches up. This way I don't need to import all the projects again.
只需在本地文件系统上复制整个工作区。这对我有用,因为我的新功能分支具有相同的 pom 文件,因此整体构建匹配。这样我就不需要再次导入所有项目。
回答by Leon
This plugin will help you: http://marketplace.eclipse.org/content/workspace-preferences-transferrer.
该插件将帮助您:http: //marketplace.eclipse.org/content/workspace-preferences-transferrer。
Select "copy preferrences" when switch to or create a new workspace.
切换到或创建新工作区时选择“复制首选项”。