【问题标题】:How to get all installed features in rcp 4 application如何在 rcp 4 应用程序中获取所有已安装的功能
【发布时间】:2018-12-24 22:23:59
【问题描述】:

我正在尝试获取通过代码安装的功能列表。如何以编程方式列出所有已安装的功能?

【问题讨论】:

  • 我正在尝试通过以下代码获取功能 ::: IBundleGroupProvider[] providers = Platform.getBundleGroupProviders(); IBundleGroup[] 组 = 提供者[0].getBundleGroups();但我得到了一个异常:: org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: Type has not been loaded while retrieving component type of array.
  • 捆绑组提供者列表在纯 e4 应用程序中始终为空,因为不包括填充它的代码。
  • 您知道如何获取所有已安装的功能吗?
  • 我昨天花了一些时间查看,但据我所知,e4 没有此信息。
  • 我发现有一个“platform.xml”可供您阅读 - 请参阅更新后的答案

标签: eclipse eclipse-plugin eclipse-rcp e4


【解决方案1】:

在纯 e4 应用程序中

IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();

调用始终返回一个空数组,因为不包括填充列表 (org.eclipse.update.configurator) 的代码。

e4 中似乎没有任何具有功能列表的内容。

RCP 构建确实在包含功能列表的 RCP 安装中的 configuration/org.eclipse.update 目录中创建了一个 platform.xml 文件。你可以试试看这篇。

请注意,如果您只是在 Eclipse 中使用“作为 Eclipse 应用程序运行”来运行 RCP,则 platform.xml 不存在。它只存在于导出的 RCP 中。

【讨论】:

    猜你喜欢
    • 2012-10-02
    • 2021-11-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-29
    • 2019-09-17
    • 2015-01-14
    • 1970-01-01
    相关资源
    最近更新 更多