Where does Eclipse store preferences?(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.
对于每个工作区,在
中存储的文件中.
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 在哪里存储首选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Eclipse 在哪里存储首选项?


基础教程推荐
- 多个组件的复杂布局 2022-01-01
- 从 python 访问 JVM 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 大摇大摆的枚举 2022-01-01