Eclipse:如何以编程方式获取启动首选项

Eclipse: How to programmatically get Launching preferences

该插件没有激活器。它需要访问在 Window -> 首选项 -> Run/Debug -> 启动页面上定义的 Eclipse IDE 的首选项值。

如何以编程方式进行?

您可以使用类似的东西:

IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, IDebugUIConstants.PLUGIN_ID);

store.getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH);

... other preferences listed in IDebugUIConstants

IDebugUIConstants 中并未列出启动页面上的所有首选项。其他的被认为是内部的。