简体   繁体   中英

Eclipse rcp extension cannot be found in registry

I am developing an Eclipse e4 RCP application. As an example, there are two plugins A and B . A is set up as the application plugin in product definition. It defines an extension point EP that needs contribution from plugin B . The start page, defined in A , of the application contains some widgets requiring extension of EP by B to set up. The problem is that the extension by B is not available while constructing the start page. I did some debugging, and found EP could be acquired from the registry. However, EP.getExtensions() returns empty array. 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 . 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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