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

1、重启RCP应用
PlatformUI.getWorkbench().restart();


2、在插件资源库中查找Perspective(其它extend point资源的获得类似)
IPerspectiveDescriptor ipd = PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(FavoritePerspective.ID); //根据plugin.xml中的ID查找


3、获得当前RCP应用的shell
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();


4、显示帮助信息
PlatformUI.getWorkbench().getHelpSystem().displayHelp();

你可能感兴趣的:(java,eclipse,xml)