Suz*_*ioc 2 java eclipse osgi eclipse-rcp e4
我想在E4 RCP应用程序启动后运行一些东西.
怎么做?
你可以用一个LifeCycle班级做到这一点.您可以在产品的lifeCyceURI属性中指定:
<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
name="%product.name"
application="org.eclipse.e4.ui.workbench.swt.E4Application">
<property
name="lifeCycleURI"
value="bundleclass://plugin-id/package.LifeCycle">
</property>
....
Run Code Online (Sandbox Code Playgroud)
该PostContextCreate注释运行在启动很早就:
public class LifeCycle
{
@PostContextCreate
public void postContextCreate()
{
}
}
Run Code Online (Sandbox Code Playgroud)