Eclipse 自定义启动插件不触发
Eclipse Custom Splash Plugin Not Triggering
我通过扩展 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 Class
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 组件。)
还有什么可以激活自定义启动画面吗?
您已指定您的启动画面用于 ID 为 splash.splashHandlerProductBinding
的产品。此 ID 必须与使用 org.eclipse.core.runtime.products
扩展点声明的产品 ID 匹配。
您还必须 运行 RCP,方法是在 运行 配置中将产品 ID 指定为 运行。
我通过扩展 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 Class
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 组件。)
还有什么可以激活自定义启动画面吗?
您已指定您的启动画面用于 ID 为 splash.splashHandlerProductBinding
的产品。此 ID 必须与使用 org.eclipse.core.runtime.products
扩展点声明的产品 ID 匹配。
您还必须 运行 RCP,方法是在 运行 配置中将产品 ID 指定为 运行。