ContentMerge Viewers

Identifier:
org.eclipse.compare.contentMergeViewers

Description:
This extension point allows a plug-in to register compare/merge viewers for specific content types. The viewer is expected to extend org.eclipse.jface.viewers.Viewer. However, since viewers don't have a default constructor, the extension point must implement the factory interface for viewers org.eclipse.compare.IViewerCreator.

Configuration Markup:

<!ELEMENT extension (viewer* , contentTypeBinding*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT viewer EMPTY>

<!ATTLIST viewer

id         CDATA #REQUIRED

class      CDATA #REQUIRED

extensions CDATA #IMPLIED

label      CDATA #IMPLIED>


<!ELEMENT contentTypeBinding EMPTY>

<!ATTLIST contentTypeBinding

contentTypeId        IDREF #REQUIRED

contentMergeViewerId IDREF #REQUIRED>

A contentTypeBinding binds a merge viewer to a content type.



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

 
<extension point = "org.eclipse.compare.contentMergeViewers"> 
     <viewer 
         id="org.eclipse.compare.contentmergeviewer.TextMergeViewer" 
         class="org.eclipse.compare.internal.TextMergeViewerCreator" 
         extensions="txt"
         label="Text Compare" 
    /> 
</extension> 

API Information:
The contributed class must implement org.eclipse.compare.IViewerCreator

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


Copyright (c) 2000, 2009 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0