Eclipse RCP - relative field of view perspective extension not working

对着背影说爱祢 提交于 2019-12-04 19:30:55

This is a bit odd. I've tried your method a while ago and it didn't work for me either. Instead, take a programmatical approach.

With the use of the IPageLayout you receive in the createInitialLayout method of your Perspective, try creating a IPlaceholderFolderLayout:

final IPlaceholderFolderLayout folder = layout.createPlaceholderFolder("main.editor.area", IPageLayout.TOP, 0.8f, layout.getEditorArea()); //$NON-NLS-1$

You can position each view in that folder with the help of those parameters. Then add your view to that folder:

folder.addPlaceholder("your.view.ID" + ":*"); //$NON-NLS-1$

I recommend you make static final String constants of your IDs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!