Eclipse e4:ModeledPageLayout`getFolderForView(String)`似乎不起作用

时间:2016-02-09 13:11:35

标签: eclipse model eclipse-plugin eclipse-rcp e4

我之前使用的是Eclipse Indigo(3.7),目前我在e4(兼容模式)之上运行我的3.x源代码。

在e4(Eclipse Luna)上运行我的3.x源时,我得到一个返回值nulllayout.getFolderForView(String)

public void createInitialLayout(IPageLayout layout) {


    super.createInitialLayout(layout);

    IPlaceholderFolderLayout topLeftFolder = layout.getFolderForView("com.veb.views.ModuleExplorerView"); 

    topLeftFolder.addPlaceholder("com.debugger.ui.modules.ModulesView");
    topLeftFolder.addPlaceholder("org.eclipse.debug.ui.VariableView"); 
 }

注意:请注意上述代码段在3.x Eclipse(Indigo)中运行良好,问题仅发生在Eclipse e4(或Luna)上。

在eclipse 3.x系列中,layout被观察为PageLayout,而在Eclipse e4中,它是ModeledPageLayout

Eclipse e4模型中没有

PageLayout本身,所以我遇到了问题。

如何在IPlaceholderLayout中为现有视图(在plugin.xml中定义)获取e4个实例?

存在任何备用API以检索相同的??

任何解决方法(或建议)都将不胜感激!

0 个答案:

没有答案