ContentViewers

标识符:org.eclipse.compare.contentViewers

描述:此扩展点允许插入特定内容类型的查看器。当提供资源版本或者它的一小部分时,会在 EditionSelectionDialog 中使用这些查看器。查看器必须扩展 org.eclipse.jface.viewers.Viewer, 并且必须接受类型为 IStreamContentAccessor 的查看器输入。
然而,由于查看器没有缺省构造器, 因此,扩展点必须实现查看器的生成器对象:接口 org.eclipse.compare.IViewerCreator

配置标记:

   <!ELEMENT viewer EMPTY>
   <!ATTLIST viewer
      id         CDATA #REQUIRED
      class      CDATA #REQUIRED
      extensions CDATA #REQUIRED
   >

示例:
以下是文本文件(扩展名为“txt”)的查看器的示例:

<extension point = "org.eclipse.compare.contentViewers">
     <viewer
         id="org.eclipse.compare.internal.TextViewer"
         class="org.eclipse.compare.internal.TextViewerCreator"
         extensions="txt"
    />
</extension>

所提供的实现:
“比较 UI”插件定义文本和图像的内容查看器。

Copyright IBM Corp. 2000, 2001.  All Rights Reserved.