如何克隆 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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 19:54:30  来源:igfitidea点击:

How to Clone an Eclipse Workspace

eclipseworkspace

提问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 .settingsfolder and the .launchesfolder 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 .settingsfolder can be found under the org.eclipse.core.runtimefolder The .launchesfolder is under the org.eclipse.debug.corefolder.

我的首选方法是将.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视频培训课程中涵盖的众多技巧之一。)

Windows Explorer Shot of .settings location

.settings 位置的 Windows 资源管理器截图

回答by Bozho

You can try copying the workspace/.metadatafolder. 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.

切换到或创建新工作区时选择“复制首选项”。