为所有 Eclipse 工作区设置首选项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7933882/
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
Setting preferences for all Eclipse workspaces
提问by sixtyfootersdude
How can I apply eclipse preferences to all eclipse workspaces?
如何将 eclipse 首选项应用于所有 eclipse 工作区?
For example if I go:
例如,如果我去:
Window -> Preferences -> General -> Keys -> Add a Shortcut
I would like to use that shortcut in all of my eclipse workspaces (different projects). Is there a way to apply preferences to all workspaces?
我想在我的所有 eclipse 工作区(不同的项目)中使用该快捷方式。有没有办法将首选项应用到所有工作区?
I would also like to configure what perspectives come up by default when I start a new workspace.
我还想配置在我启动新工作区时默认出现的透视图。
回答by bilash.saha
If you want preserve all your settings, simply copy the
如果您想保留所有设置,只需复制
.metadata/.plugins/org.eclipse.core.runtime/.settings
directory into your desired workspace directory
目录到您想要的工作区目录
You can also export the preferences you set in the template workspace and then import them into other workspaces. This is the preferred method supported by Eclipse.
您还可以导出您在模板工作区中设置的首选项,然后将它们导入其他工作区。这是 Eclipse 支持的首选方法。
Go to
去
File->Export then choose General->Preferences
click Next then select the “Export all” radio button and fill in or browse to a file path where you want to save the preferences . Click Finish and your preferences are exported to that file.
单击下一步,然后选择“全部导出”单选按钮并填写或浏览到要保存首选项的文件路径。单击完成,您的首选项将导出到该文件。
Select
选择
File->Switch Workspace,>… to switch to a different workspace.
When Eclipse restarts in the new workspace select File->Import then General->Preferences click Next and browse to your saved preferences file and click Finish to import your preferences into the current workspace.
当 Eclipse 在新工作区中重新启动时,选择 File->Import 然后选择 General->Preferences 单击 Next 并浏览到您保存的首选项文件并单击 Finish 将您的首选项导入当前工作区。