【问题标题】:eclipse rcp perspectiveExtension showInPart not visibleeclipse rcp perspectiveExtension showInPart 不可见
【发布时间】:2020-05-19 19:18:04
【问题描述】:

我希望我的 ViewPart 添加到 Show In 组。我添加了perspectiveExtension 并在其下添加了showInPart,当我运行/调试我的插件时,我的视图没有出现在Show In 上下文菜单组中。

这是我在plugin.xml中的扩展点

<extension
     point="org.eclipse.ui.perspectiveExtensions">
  <perspectiveExtension
        targetID="org.eclipse.jdt.ui.JavaPerspective">
     <showInPart
           id="com.ex.views.DebugView">
     </showInPart>
  </perspectiveExtension>
  <perspectiveExtension
        targetID="org.eclipse.ui.resourcePerspective">
     <showInPart
           id="com.ex.views.DebugView">
     </showInPart>
  </perspectiveExtension>
</extension> 

【问题讨论】:

  • 你的视图是否实现IShowInTarget?您是在 Java 或资源视角(例如,不是插件开发视角)中尝试这个吗?您可能需要重置视角。
  • 是的,1. DebugView 实现了 IShowInTarget 2. 我在调试的目标 eclipse 中尝试了 Java 或 Resource 透视图

标签: eclipse-plugin eclipse-rcp


【解决方案1】:

使用 Eclipse 4.15(尽管也可能是任何 4.x),我必须从一个新的工作区开始,这样更改才能生效。调试 Eclipse 时(在非干净/旧的工作区中),更改没有效果。

【讨论】:

    猜你喜欢
    • 2016-12-28
    • 2011-12-13
    • 2011-04-29
    • 2011-02-08
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 2013-01-18
    • 2023-03-28
    相关资源
    最近更新 更多