Eclipse 在哪里存储首选项?

Where does Eclipse store preferences?(Eclipse 在哪里存储首选项?)
本文介绍了Eclipse 在哪里存储首选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

当我在如下屏幕截图所示的窗口中更改设置时,这些设置实际存储在哪里?

When I change a setting in a window like in the screenshot below, where are those settings actually stored?

奖励:有什么方法可以使用 Java、Eclipse RCP 等以编程方式访问设置?

Bonus: Is there any way, using Java, Eclipse RCP etc, to access the settings programmatically?

谢谢!

推荐答案

来源:Eclipse wiki

如果您想将首选项从一个版本保留到另一个版本,请使用 File/Export/Preferences 导出它们.

If you want to keep preferences from one version to the other, export them using File/Export/Preferences.

首选项存储在不同的地方(这适用于 Eclipse 3.1)

Preferences are stored in various places (this applies to Eclipse 3.1)

对于每个安装(但对于多用户安装,这可能会有所不同),存储在以下文件中:<eclipse_home>/eclipse/configuration/.settings/

for each installation (but this may vary for multi-user installations), in files stored in: <eclipse_home>/eclipse/configuration/.settings/

每个插件通常有一个文件,带有 prefs 扩展名.请注意,很少有插件使用安装范围的首选项.

There is typically one file per plugin, with a prefs extension. Note that very few plug-ins use installation-wide preferences.

对于每个工作区,在 /.metadata/.plugins/org.eclipse.core.runtime/.settings 中存储的文件中.

for each workspace, in files stored in <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings .

每个插件通常有一个文件,带有 prefs 扩展名.对于每个项目 -- 用于项目级设置 -- 存储在项目文件夹的 .settings 子目录中的文件中.

There is typically one file per plugin, with a prefs extension. for each project --for project-level settings -- in files stored in a .settings sub-directory of your project folder.

这里使用java代码访问首选项的文章.

Here's the article to access preferences using java code.

这篇关于Eclipse 在哪里存储首选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)