RCP学习:Splash状态栏
2013-01-08 10:49
281 查看
今天遇到个问题,Eclipse在Splash启动阶段对多线程的支持有点不同。根据某人的见解,org.eclipse.ui.internal.StartupThreading 可以解决这个问题
我看了一眼Eclipse自己的Splash实现是这样的:
Eclipse建议的状态监控,是用IProgressMonitor来解决,使用方式是重写
org.eclipse.ui.splash.AbstractSplashHandler.getBundleProgressMonitor()这个方法。
然后提供一个IProgressMonitor,参考org.eclipse.jface.wizard.ProgressMonitorPart。
我看了一眼Eclipse自己的Splash实现是这样的:
private void updateUI(final Runnable r) { Shell splashShell = getSplash(); if (splashShell == null || splashShell.isDisposed()) return; Display display = splashShell.getDisplay(); if (Thread.currentThread() == display.getThread()) r.run(); // run immediatley if we're on the UI thread else { // wrapper with a StartupRunnable to ensure that it will run before // the UI is fully initialized StartupRunnable startupRunnable = new StartupRunnable() { public void runWithException() throws Throwable { r.run(); } }; display.asyncExec(startupRunnable); } }
Eclipse建议的状态监控,是用IProgressMonitor来解决,使用方式是重写
org.eclipse.ui.splash.AbstractSplashHandler.getBundleProgressMonitor()这个方法。
然后提供一个IProgressMonitor,参考org.eclipse.jface.wizard.ProgressMonitorPart。
相关文章推荐
- Android学习——获取状态栏,标题栏,导航栏高度的方法
- MFC学习笔记——状态栏(基于对话框的MFC程序)
- MFC复习和学习 第三章 MFC工具栏 MFC 状态栏 MFC视图创建
- python3学习之Splash的安装与实例教程
- IOS学习笔记-IOS7状态栏适配方法一
- 学习RCP编程
- C#中菜单栏,工具栏,状态栏的学习总结
- [学习心得]andorid获取界面上View坐标以及状态栏和标题栏高度
- IOS学习笔记56-IOS7状态栏适配方法一
- 孙鑫VC学习笔记:第九讲 界面修改,工具栏,状态栏,启动画面的制作
- Android课程---关于下拉列表与状态栏提示的学习
- IOS学习笔记57--IOS7状态栏适配(二)
- PyQt5学习教程6:在窗体中显示状态栏
- Android状态栏学习博客---供参考
- Windows Phone学习笔记:设计启动画面 (Splash screen)
- 学习Java6(八)Splash(1)HellpSplash
- 我的RCP学习过程(一)
- C# 学习笔记六 对话框、菜单、工具栏、状态栏
- MonoDroid学习笔记(十二)—— 您有一条新短信息,请注意查收。状态栏提醒
- MFC学习笔记之七————工具栏编程与状态栏编程