在我的 Eclipse RCP 应用程序中,我有四个 View A、B、C、D。我只想在应用程序启动时显示 A、B、C View ,并在用户单击按钮时显示 D View 。
我正在动态添加 View
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("D_ViewID",null, IWorkbenchPage.VIEW_ACTIVATE);
this view is added at the bottom but I want this D view adjacent to B_View in such a way
my perspective code is here:
@Override
public void createInitialLayout(IPageLayout layout) {
String editor = layout.getEditorArea();
layout.setEditorAreaVisible(false);
IFolderLayout top=layout.createFolder("view",IPageLayout.TOP , 0.80f, editor);
top.addView(B.ID);
layout.addView(A.ID, IPageLayout.LEFT, 0.20f, BrowserView.B);
layout.addView(c.ID, IPageLayout.BOTTOM, 0.20f,editor);
}
最佳答案
您需要 add a placeholder到透视图,就像您添加了已经可见的 View 一样。如果您查看 IPageLayout documentation 的顶部,有一个示例将书签 View 添加为占位符。
关于eclipse-plugin - 在特定文件夹中添加透视图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13206678/