[英]Run Eclipse Plugin Activator's .start() Method on UI Thread
The specification of the AbstractUIPlugin states that the startup
method can't assume that it's run on the UI thread. AbstractUIPlugin的规范指出, startup
方法不能假定它在UI线程上运行。 Is this also true of the start
method? start
方法也是如此吗?
The start
method is not a suitable place to put UI code. start
方法不适合放置UI代码。 Amongst other things it is not normally called until some other code in your plugin runs. 除其他外,通常在插件中的其他代码运行之前,通常不会调用它。
The JavaDoc for Plugin
where start
is defined says: 定义start
的JavaDoc for Plugin
表示:
This method and the stop(BundleContext) may be called from separate threads, but the OSGi framework ensures that both methods will not be called simultaneously. 可以从单独的线程中调用此方法和stop(BundleContext),但是OSGi框架确保不会同时调用这两个方法。
which does not really guarantee which thread start
will run on. 这并不能真正保证start
哪个线程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.