Eclipse自定义Splash插件不触发

时间:2016-06-01 07:34:43

标签: eclipse eclipse-plugin splash-screen

我通过扩展BasicSplashHandler创建了一个简单的eclipse启动画面。

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension point="org.eclipse.ui.splashHandlers">
  <splashHandler
        class="splash.MySplashHandler"
        id="splash.splashHandler">
  </splashHandler>
  <splashHandlerProductBinding productId="splash.splashHandlerProductBinding"
        splashId="splash.splashHandler">
  </splashHandlerProductBinding>
</extension>
</plugin>

FlashHandler类

public class MySplashHandler extends BasicSplashHandler {

  public MySplashHandler() {
    super();
  }

  @Override
  public void init(Shell splash) {
    //To make this more simple, I just print it out for now.
    System.out.println("This doen't triggered");
    super.init(splash);
  }
}

但是当我将项目作为eclipse应用程序运行时,它仍然会显示默认的启动而不是我的启动。 (上面的示例我删除了所有自定义UI组件。)

还有什么可以激活自定义启动吗?

1 个答案:

答案 0 :(得分:1)

您已指定您的启动内容适用于ID为splash.splashHandlerProductBinding的产品。此ID必须与使用org.eclipse.core.runtime.products扩展点声明的产品的ID相匹配。

您还必须通过指定要在“运行配置”中运行的产品ID来运行RCP。