代码之家  ›  专栏  ›  技术社区  ›  Jeremy

如何取消Eclipse警告:在属性“id”中找不到引用的标识符“viewName:secondaryID”

  •  1
  • Jeremy  · 技术社区  · 15 年前

    在Eclipse3.4中,这里是我的plugin.xml的部分:

    <extension point="org.eclipse.ui.views">
      <view
        allowMultiple="true"
        class="the.full.class.name"
        icon="images/icon.gif"
        id="VIEWNAME"
        name="View Name">
      </view>
    </extension>
    <extension point="org.eclipse.ui.perspectiveExtensions">
      <perspectiveExtension targetID="MY_PERSPECTIVE_ID">
         <view
            closeable="false"
            id="VIEWNAME:secondaryid"
            minimized="false"
            moveable="false"
            ratio=".75"
            relationship="left"
            relative="org.eclipse.ui.editorss"
            showTitle="true"
            standalone="true"
            visible="true">
          </view>
        </perspectiveExtension>
      </extension>
    

    这个应用程序工作得很好,我就是摆脱不了那个烦人的警告!

    2 回复  |  直到 15 年前
        1
  •  0
  •   Ankur    15 年前
        2
  •  0
  •   Favonius    15 年前

    这个

    perspectiveExtensions
    扩展点需要实际的视图ID。因为在您的情况下,它是“viewname”,因此用于
    透视扩展
    ID字段使用相同的。

    这样做之后,重置Eclipse垂直并再次打开它。