当前位置: 代码迷 >> Eclipse >> Eclipse RCP 插件开发中常常调用的几个方法
  详细解决方案

Eclipse RCP 插件开发中常常调用的几个方法

热度:455   发布时间:2016-04-23 12:34:04.0
Eclipse RCP 插件开发中经常调用的几个方法
1、重启RCP应用

  PlatformUI.getWorkbench().restart();

  2、在插件资源库中查找Perspective(其它extend point资源的获得类似)

IPerspectiveDescriptoripd=PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(FavoritePerspective.ID); //根据plugin.xml中的ID查找

  3、获得当前RCP应用的shell

  Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();

  4、显示帮助信息

  PlatformUI.getWorkbench().getHelpSystem().displayHelp();

(责任编辑:admin)
  相关解决方案