开发者

Disable Installed Software & Installation History tab on Help | About | Installation Details

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.


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");


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

Not the most elegant solution, but it works.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜