2013-12-20 97 views

回答

5

你可以用LifeCycle這個類來做到這一點。

<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> 
    .... 

PostContextCreate註釋在啓動非常早的運行:您在產品的lifeCyceURI屬性來指定這個

public class LifeCycle 
{ 
    @PostContextCreate 
    public void postContextCreate() 
    { 
    } 
} 

Register for the Eclipse 4 Application Life Cycle

相關問題