网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容 知识问答

eclipse rcp显示视图定位

时间:2024-10-14 13:37:32

1、首先建立一个插件项目,新手可以看一下链接。

2、新建一个viewpart视图,不熟悉怎么建立视图看一下上个经验。本次用的视图Vpyuyuedengji.ID.https://jingyan.baidu.com/article/8ebacdf06ef6ea49f75cd566.html

eclipse rcp显示视图定位eclipse rcp显示视图定位

4、打开Perspective这个文件,找到createInitialLayout这个方法,添加代码:IFolderLayout bottom=layout.createFolder("bottom", IPageLayout.BOTTOM, 0.85f, IPageLayout.ID_EDITOR_AREA); bottom.addPlaceholder(Vpyuyuedengji.ID);这个命令是在“bottom”这个区域中显示视图。

eclipse rcp显示视图定位

5、在createInitialLayout这个方法添加代码,在左面区域中显示视图:IFolderLayout left=layout.createFolder("left", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); left.addPlaceholder(Vpyuyuedengji.ID);

eclipse rcp显示视图定位

6、在右面区域中显示视图:IFolderLayout right=layout.createFolder("right", IPageLayout.RIGHT, 0.85f, IPageLayout.ID_EDITOR_AREA);right.addPlaceholder(Vpyuyuedengji.ID);

eclipse rcp显示视图定位eclipse rcp显示视图定位
© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com