简体   繁体   English

在注册表中找不到Eclipse rcp扩展

[英]Eclipse rcp extension cannot be found in registry

I am developing an Eclipse e4 RCP application. 我正在开发Eclipse e4 RCP应用程序。 As an example, there are two plugins A and B . 例如,有两个插件AB A is set up as the application plugin in product definition. 在产品定义中将A设置为应用程序插件。 It defines an extension point EP that needs contribution from plugin B . 它定义了一个扩展点EP ,需要插件B贡献。 The start page, defined in A , of the application contains some widgets requiring extension of EP by B to set up. 在应用程序的A定义的起始页面包含一些小部件,需要将EP扩展B来进行设置。 The problem is that the extension by B is not available while constructing the start page. 问题在于,在构造起始页时, B扩展名不可用。 I did some debugging, and found EP could be acquired from the registry. 我进行了一些调试,发现可以从注册表中获取EP However, EP.getExtensions() returns empty array. 但是, EP.getExtensions()返回空数组。 I thought that could be caused by plugin's lazy loading. 我认为这可能是由插件的延迟加载引起的。 So I tried to set plugin's start level and auto load. 因此,我尝试设置插件的开始级别和自动加载。 It didn't work. 没用 Then I tried to define an extension of org.eclipse.ui.startup . 然后,我尝试定义org.eclipse.ui.startup的扩展名。 It didn't help either. 它也没有帮助。 I have run out all solutions I could imagine. 我已经用尽了所有我能想到的解决方案。 Any help is appreciated. 任何帮助表示赞赏。

Finally, I found the problem. 最后,我发现了问题。 I ran the application using the Run button on Eclipse's toolbar. 我使用Eclipse工具栏上的“运行”按钮运行该应用程序。 The run command was initially created when the application was started in the product definition editor. 运行命令最初是在产品定义编辑器中启动应用程序时创建的。 The plugin was added after the first run, and it did not get updated to the run command for the button on toolbar. 该插件是在第一次运行后添加的,并且没有更新为工具栏上按钮的运行命令。 I manually removed the command from the run button and rerun the app from product definition editor. 我从运行按钮中手动删除了该命令,然后从产品定义编辑器中重新运行该应用程序。 Everything works fine now. 现在一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM