透视图切换
发布日期:2022-02-15 02:36:11 浏览次数:6 分类:技术文章

本文共 686 字,大约阅读时间需要 2 分钟。

RCP中透视图Perspective切换

代码切换透视图:

PlatformUI.getWorkbench().showPerspective("透视图id",

       PlatformUI.getWorkbench().getActiveWorkbenchWindow());

配置文件显示透视图切换按钮:

在rcp项目的根目录新建plugin_customization.ini文件,内容如下:

#设置视图标题栏的弧线型外观

org.eclipse.ui./SHOW_TRADITIONAL_STYLE_TABS = false
#
# 显示在右侧上方 默认为左侧
org.eclipse.ui/DOCK_PERSPECTIVE_BAR=TOP_RIGHT

-------------------

关闭Perspective

IWorkbench w=PlatformUI.getWorkbench();
IPerspectiveRegistry pr=w.getPerspectiveRegistry() ;
IPerspectiveDeor persdes=pr.findPerspectiveWithId("perspectiveID");

WorkbenchPage p=(WorkbenchPage)w.getActiveWorkbenchWindow

().getActivePage();

Perspective persp = p.getActivePerspective();
p.closePerspective(persdes,false,false);

转载地址:https://blog.csdn.net/peterlu20110415/article/details/6923900 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:ORA-01843的错误.这个错误代表无效的月份一般在日期转化的时候会提示
下一篇:jQuery获取iframe内的DOM对象

发表评论

最新留言

很好
[***.229.124.182]2024年04月13日 21时34分08秒