Content Viewers

Identifier: org.eclipse.compare.contentViewers

Description: This extension point allows to plug in a viewer for specific content types. These viewers are used in the EditionSelectionDialog when presenting an edition of a resource or a subsection thereof. The viewer must extend org.eclipse.jface.viewers.Viewer and must accept a viewer input of type IStreamContentAccessor. However since viewers don't have a default constructor the extension point must implement a factory object for viewers: the interface org.eclipse.compare.IViewerCreator.

Configuration Markup:

   <!ELEMENT extension (viewer*)>

   <!ATTLIST extension
     point CDATA #REQUIRED
     id    CDATA #IMPLIED
     name  CDATA #IMPLIED
   >

   <!ELEMENT viewer EMPTY>

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

Examples: The following is an example of a viewer for text files (extension "txt"):

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

Supplied Implementation: The Compare UI plugin defines content viewers for text and images.

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