如何在eclipse-rcp中验证更新站点

问题描述 投票:1回答:1

如何通过Web或rcp应用程序(版本3.x和4.x)访问更新站点URL时对其进行身份验证。

推荐网址:https://www.eclipse.org/forums/index.php/t/1093851/https://www.eclipsezone.com/eclipse/forums/t106640.html

在第一个url问题中提到了LoginDialog(org.eclipse.equinox.internal.p2.ui.dialogs.UserValidationDialog)的使用,但我不知道如何在代码中使用它。

我还按照第二个网址中提到的步骤但无法获得任何对话框。

请在下面的图像链接中找到带有数字的4个步骤,我想在步骤3和4之间进行身份验证对话

Image with steps 1 and 2

Image with step 3

Image with step 4

java eclipse-plugin eclipse-rcp equinox p2
1个回答
0
投票

来自推荐的网址https://www.eclipse.org/forums/index.php/t/1093851/

p2使用OSGi服务机制来查找服务。您需要提供org.eclipse.equinox.p2.core.UIServices的实现;

尝试将“org.eclipse.equinox.p2.ui”及其依赖项添加到您的RCP,此包注册使用public class ValidationDialogServiceUI extends UIServicesorg.eclipse.equinox.internal.p2.ui.dialogs.UserValidationDialog

© www.soinside.com 2019 - 2024. All rights reserved.