备份 Eclipse 插件和设置
我正在使用 Eclipse,并根据我的需要安装和配置了大量插件。有什么好的方法来备份这些插件及其配置。我希望能够在 futures eclipse 版本(只要它们兼容)和不同的 PC 上重播这些插件。
我知道我可以简单地归档整个 eclipse/ 文件夹,但我发现这有点不优雅。
I'm using Eclipse and have plenty of plugins installed and configured to my needs. Is there any good way to backup these plugins and the configuration of them. I want to be able to replay these plugins in futures eclipse version (as long as they are compatible) and on different PCs.
I know I could simply archive the whole eclipse/
folder, but I find this a little inelegant.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您的问题分为两个部分:
#1 很容易做到。您可以从“文件”->“导出您的 Eclipse 首选项”导出...->偏好。生成的文件包含每个已安装插件的所有首选项。它可以在 Eclipse 安装和版本之间移植。
#2 并不是真正的“Eclipse”做事方式。这是可能的,但您需要以不同的方式构建已安装的插件。您可以使用 dropins 文件夹,而不是使用标准更新管理器来安装插件。您需要做的是将您想要在多个安装之间共享的每个功能和插件复制到具有以下结构的 zip 文件中:
然后您可以将该文件解压缩到您想要的所有 Eclipse 的 dropins 文件夹中。
有关 dropins 的更多信息:
http://help.eclipse .org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/p2_dropins_format.html
There are two parts to your question:
#1 is easy to do. You can export your Eclipse preferences from the File -> Export... -> Preferences. The resulting file contains all of your preferences for each installed plugin. It is portable between Eclipse installs and versions.
#2 is not really the "Eclipse" way of doing things. It is possible, but you need to structure your installed plugins differently. Rather than using the standard update manager to install your plugins, you can use the dropins folder. What you need to do is to copy every feature and plugin that you want to be shared across multiple installs into a zip file with the following structure:
Then you can unzip the file into the dropins folder of all the Eclipses that you want.
More information on dropins:
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/p2_dropins_format.html
P2安装复制是一个帮助您备份已安装插件的工具,您可以通过 Eclipse Marketplace 安装它。
根据配置的设置,它们中的大多数都会保留在您的工作区中。因此,您可以备份您的 workspace/.metadata 文件夹。
P2 installation replication is a tool to help you backup installed plug-ins, you could install it via Eclipse Marketplace.
According to the settings of configuration, most of them are persisted in your workspace. So you could backup your workspace/.metadata folder.
虽然不优雅,但归档整个 eclipse 文件夹也是不够的。我认为您想要归档以下内容:
通过这样做,您不仅可以保留插件及其设置,还可以保留您知道插件可以工作的 Eclipse 安装。
While inelegant, archiving the entire eclipse folder is also insufficient. I think you want to archive the following:
By doing this, you will not only preserve the plugins and their settings, but you will also preserve an eclipse installation in which you know your plugins work.
我为自己做了一个小服务来同步 Eclipse 设置。目前它支持 Java 模板 + Bash 别名。可能对其他人有用。
http://confsync.com
I've made small service for myself to synchronize Eclipse settings. Currently it supports Java Templates + Bash Aliases. Could be useful for someone else.
http://confsync.com