禁用已安装的软件和“帮助”|“安装历史记录”选项卡关于 |安装细节
有什么方法可以抑制或禁用“已安装的软件”和“已安装的软件”吗?帮助 | 上的“安装历史记录”选项卡关于 | 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您不希望这些内容显示,请确保以下插件未部署在您的应用程序的目标平台中:
严格来说,您只需要删除上面列表中的第一个包,因为后续包取决于核心 ui捆。通常,如果我不希望用户推迟更新等,我只会包含上面的第一个捆绑包。然后,我围绕 p2 功能构建自定义 UI,同时重新使用一些提供的核心 p2 UI API(但不包括自动调度 UI 等)。
如果您想删除 p2 计划/更新的首选项页面,则可以在
WorkbenchAdvisor
中的postStartup()
方法中编写以下内容: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:
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 thepostStartup()
method:我最终删除了 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.
继承 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.