[英]Eclipse, How do I execute code in a bundle after the WorkBench window has been created?
So I have a bundle that needs access to the workbench window to add some items to a menu programmatically, which I can do fine. 因此,我有一个捆绑包,需要访问工作台窗口以编程方式将一些项目添加到菜单中,我可以做得很好。
But what I run into is when there's a race condition where my bundle is started before the workbench window is finished being instantiated and it will spit out an error about the workbench not existing yet when my bundle tries to add stuff to a menu with code. 但是我遇到的情况是,在一种竞争条件下,我的捆绑包在实例化工作台窗口之前就已启动,并且当我的捆绑包尝试使用代码向菜单中添加内容时,它会吐出一个关于工作台尚不存在的错误。
So is there an extension point or something that I can use to tell the program to execute such and such code after the workbench window has loaded? 那么,是否有扩展点或某些东西可以用来告诉程序在工作台窗口加载后执行此类代码? I don't want to muck around with start levels for my bundles.
我不想乱砍我的捆绑包的开始水平。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.