如何在启动时在我的rcp项目eclipse透视栏(coolbar)中显示所有透视图?

时间:2014-08-24 23:03:04

标签: eclipse rcp perspective

启动时,我只有Open Perspective按钮和我在右侧方法getInitialWindowPerspectiveId中设置的默认透视图。我想在那个酷吧上展示我所有的其他观点。

直到现在我试过:

  • config.ini文件org.eclipse.ui/PERSPECTIVE_BAR_EXTRAS=id1,id2,id3
  • plugin_customization.ini与org.eclipse.ui/PERSPECTIVE_BAR_EXTRAS=id1,id2,id3
  • 在初始化方法的类ApplicationWorkbenchAdvisor
  • 有人说这样做:

    PlatformUI.getPreferenceStore()setDefault(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS," ID1,ID2,ID3&#34)。 PlatformUI.getPreferenceStore()的setValue(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS," ID1,ID2,ID3&#34);

没有任何效果。 但是我找到了一个解决方法: 在ApplicationWorkbenchWindowAdvisor中的postWindowOpen课程中,我手动显示了我的所有观点。这使它们在酷吧中打开。然而,这不是最佳方式,也许有人知道在coolbar上显示我所有透视快捷方式的正确方法。

PlatformUI.getWorkbench().showPerspective("id1", getWindowConfigurer().getWindow());
PlatformUI.getWorkbench().showPerspective("id2", getWindowConfigurer().getWindow());
PlatformUI.getWorkbench().showPerspective("id3", getWindowConfigurer().getWindow());

由于

1 个答案:

答案 0 :(得分:0)

'plugin_customization.ini'方法应该可以正常工作

  • 'plugin_customization.ini'文件必须在您的RCP插件中

  • 'plugin_customization.ini'必须包含在'build.properties'文件的构建中。

相关问题