禁用已安装的软件和“帮助”|“安装历史记录”选项卡关于 |安装细节

发布于 2024-10-03 15:40:16 字数 135 浏览 0 评论 0原文

有什么方法可以抑制或禁用“已安装的软件”和“已安装的软件”吗?帮助 | 上的“安装历史记录”选项卡关于 | RCP 中的“安装详细信息”按钮?

我没有将 P2 用于此特定应用程序,因此永远不会有任何历史记录,并且已安装的软件选项卡没有内容。

Is there some way I can suppress or disable the "Installed Software" & "Installation History" tabs on Help | About | Installation Details button in a RCP?

I'm not using P2 for this particular application so there will never be any history and the installed software tab has no content.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

予囚 2024-10-10 15:40:16

如果您不希望这些内容显示,请确保以下插件未部署在您的应用程序的目标平台中:

org.eclipse.p2.ui
org.eclipse.p2.ui.discovery
org.eclipse.p2.ui.sdk
org.eclipse.p2.ui.updatechecker

严格来说,您只需要删除上面列表中的第一个包,因为后续包取决于核心 ui捆。通常,如果我不希望用户推迟更新等,我只会包含上面的第一个捆绑包。然后,我围绕 p2 功能构建自定义 UI,同时重新使用一些提供的核心 p2 UI API(但不包括自动调度 UI 等)。

如果您想删除 p2 计划/更新的首选项页面,则可以在 WorkbenchAdvisor 中的 postStartup() 方法中编写以下内容:

PreferenceManager pm =
PlatformUI.getWorkbench(
).getPreferenceManager();

pm.remove("org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"); pm.remove("org.eclipse.update.internal.ui.preferences.MainPreferencePage");

If you do not want these do show then make sure that the following plug-ins are not deployed in your application's target platform:

org.eclipse.p2.ui
org.eclipse.p2.ui.discovery
org.eclipse.p2.ui.sdk
org.eclipse.p2.ui.updatechecker

Strictly speaking you only really need to remove the first bundle in the above list as the subsequent bundles depend on the core ui bundle. Typically, if I do not want the user to shcedule updates etc. I'll only inlcude the first bundle above. I then build a custom UI around p2 functionality whilst re-using some of the provided core p2 UI API (but without auto-scheduling UI etc. included).

If you want to remove the preference pages for the p2 sheduling/updates, then in your in your WorkbenchAdvisor you can use write the following in the postStartup() method:

PreferenceManager pm =
PlatformUI.getWorkbench(
).getPreferenceManager();

pm.remove("org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"); pm.remove("org.eclipse.update.internal.ui.preferences.MainPreferencePage");

油焖大侠 2024-10-10 15:40:16

我最终删除了 org.eclipse.p2.ui 插件的 &我构建的产品的功能。

这不是最优雅的解决方案,但它确实有效。

I ended up deleting the org.eclipse.p2.ui plugin's & features from my built product.

Not the most elegant solution, but it works.

月野兔 2024-10-10 15:40:16

继承 AboutDialog 类并重写 createButtonsForButtonBar(Composite) 方法:)
并使用您自己的 InstallationDialog 子类。

为了避免显示您不想要的选项卡,您必须重写 createFolderItems 方法。

查看 loadElements 方法以了解对话框的这一部分是如何工作的。

subclass the AboutDialog class and override the createButtonsForButtonBar(Composite) method :)
and use your own InstallationDialog subclass.

to avoid displaying the tabs you don't want you have to override the createFolderItems method.

give a look the loadElements method to understand how this part of the dialog works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文