`
czxzz
  • 浏览: 34296 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
文章分类
社区版块
存档分类

eclipse RCP 插件开发

阅读更多

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

1
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics