【问题标题】:How do I show all perspectives in my rcp project eclipse perspective bar (coolbar) upon startup?如何在启动时在我的 rcp 项目 eclipse 透视栏(coolbar)中显示所有透视图?
【发布时间】: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


    【解决方案1】:

    “plugin_customization.ini”方法应该可以工作

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

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

    【讨论】:

    • 它包含在课程构建中。我还确保在重新运行项目之前清除工作区和配置区域,但仍然无法正常工作。我一定是错过了什么......
    猜你喜欢
    • 2014-11-25
    • 2016-06-15
    • 2015-07-15
    • 1970-01-01
    • 1970-01-01
    • 2016-04-05
    • 2016-08-05
    • 1970-01-01
    • 2011-01-13
    相关资源
    最近更新 更多