Welcome

首页 / 软件开发 / JAVA / Eclipse RCP插件开发中经常调用的几个方法

Eclipse RCP插件开发中经常调用的几个方法2010-12-04spark1、重启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();