六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 104|回复: 0

eclipse RCP 插件开发

[复制链接]

升级  30%

3

主题

3

主题

3

主题

童生

Rank: 1

积分
15
 楼主| 发表于 2013-2-7 20:58:30 | 显示全部楼层 |阅读模式
1避免使用绝对路径,使用打成jar文件后的插件的相对路径来调用本地资源。
譬如使用icon时
static Image image= AbstractUIPlugin.imageDescriptorFromPlugin("Plugin Name", "icon/icon.png").createImage();Label temp=new label();temp.setImage(temp); 
 
2.利用Window shell 在后台调用默认浏览器,弹出窗口,打开指定网页
String cmd = "rundll32 url.dll,FileProtocolHandler http://xiezezhun.blogbus.com/ ,nil, nil, SW_SHOW";Runtime.getRuntime().exec(cmd); 
 
3.设置定时timer,定时刷新页面
int timer=1000*60*15;parent.getDisplay().timerExec(timer, new Runnable(){   public void run()   {       refresh();       System.out.print("I am refreshing");       parent.getDisplay().timerExec(timer, this);   }}); 
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://xiezezhun.blogbus.com/logs/44005713.html
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表