【发布时间】:2014-10-18 02:00:33
【问题描述】:
在启动时,我只有 Open Perspective 按钮和我在方法 getInitialWindowPerspectiveId 中设置的默认透视图。我想展示我对那个酷栏的所有其他观点。
直到现在我都尝试过:
- 带有
org.eclipse.ui/PERSPECTIVE_BAR_EXTRAS=id1,id2,id3的config.ini 文件 - plugin_customization.ini 与
org.eclipse.ui/PERSPECTIVE_BAR_EXTRAS=id1,id2,id3 -
在
ApplicationWorkbenchAdvisor类的初始化方法中有人说要这样做:PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS,"id1,id2,id3"); PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS,"id1,id2,id3");
没有任何效果。
但是我找到了一种解决方法:
在postWindowOpen 的课堂ApplicationWorkbenchWindowAdvisor 中,我手动展示了我所有的观点。这使它们在冷却栏中打开。然而,这不是最佳方式,也许有人知道在酷栏上显示我所有透视快捷方式的正确方式。
PlatformUI.getWorkbench().showPerspective("id1", getWindowConfigurer().getWindow());
PlatformUI.getWorkbench().showPerspective("id2", getWindowConfigurer().getWindow());
PlatformUI.getWorkbench().showPerspective("id3", getWindowConfigurer().getWindow());
谢谢
【问题讨论】:
标签: eclipse rcp perspective