【问题标题】:Eclipse: How to programmatically get Launching preferencesEclipse:如何以编程方式获取启动首选项
【发布时间】:2015-11-19 19:09:18
【问题描述】:

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

如何以编程方式进行?

【问题讨论】:

  • 不确定你为什么投了反对票,这对我来说似乎是一个合法的问题。该插件确实有一个激活器,但它是内部的 org.eclipse.debug.internal.ui.DebugUIPlugin。
  • 感谢您对激活器的帮助

标签: eclipse eclipse-plugin


【解决方案1】:

你可以使用类似的东西:

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

store.getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH);

... other preferences listed in IDebugUIConstants

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

【讨论】:

    猜你喜欢
    • 2014-11-24
    • 1970-01-01
    • 2011-04-30
    • 2015-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-09
    • 1970-01-01
    相关资源
    最近更新 更多