【发布时间】:2013-02-14 14:27:29
【问题描述】:
在 Eclipse RCP 应用程序中,splash.bmp 用作启动画面。它在应用程序运行大约 5-6 分钟后关闭。我希望它在某些 UI 显示后立即关闭。我尝试在PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()) 之前使用应用程序上下文的Platform.endSplash() 和applicationRunning()。
无法关闭启动画面。
任何建议都会有所帮助。如果我可以在大约 10 -15 秒后关闭启动画面也可以。
public Object start(IApplicationContext arg0) throws Exception {
Display display = PlatformUI.createDisplay();
int returnCode = 0;
try {
//arg0.applicationRunning();
Platform.endSplash();
returnCode = PlatformUI.createAndRunWorkbench(display,
new ApplicationWorkbenchAdvisor());
if (returnCode == PlatformUI.RETURN_RESTART) {
return PlatformUI.RETURN_RESTART;
}
return PlatformUI.RETURN_OK;
} finally {
//some other code here.
display.dispose();
}
}
【问题讨论】:
-
我以前从未遇到过这种情况。在我所有的 RCP 应用程序中,splash.bmp 会在应用程序启动后立即关闭。您使用的是什么版本的 Eclipse?
-
版本:Indigo Service Release 2 Build id:20120216-1857
标签: eclipse splash-screen rcp