【问题标题】:how to obtain the information about System Configuration in RCP 4如何在 RCP 4 中获取有关系统配置的信息
【发布时间】:2018-12-11 21:27:45
【问题描述】:

我正在尝试获取有关 RCP 4 应用程序中系统配置的信息。我有一个链接RCP3 System Configuration,它在 RCP3 中实现,用于获取系统配置。 WorkbenchMessages 属性和 WorkbenchPlugin 用于在 RCP3 应用程序中获取系统配置,但在 RCP4 中这些不可用。如何实现获取系统配置?

【问题讨论】:

    标签: eclipse eclipse-plugin rcp e4


    【解决方案1】:

    您引用的ConfigurationInfo 类正在使用org.eclipse.ui.systemSummarySection 扩展点并调用它定义的ISystemSummarySection 接口以获取系统摘要。

    此扩展点和ISystemSummarySection 接口在普通的 e4 应用程序中不存在,因此使用此代码无法获得此信息。

    您可以通过查看实现ISystemSummarySection 的各个类并复制不使用 3.x 兼容模式类的那些部分的代码来获得一些信息。

    例如ConfigurationLogDefaultSection 类只使用System.getProperties() 列出系统属性部分。

    【讨论】:

      猜你喜欢
      • 2020-05-24
      • 1970-01-01
      • 1970-01-01
      • 2016-03-12
      • 2011-06-02
      • 1970-01-01
      • 2011-03-28
      • 2011-12-14
      • 2014-07-24
      相关资源
      最近更新 更多