Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

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

>

  • point - a fully qualified identifier of the target extension point
  • id - an optional identifier of the extension instance
  • name - an optional name of the extension instance

<!ELEMENT viewer EMPTY>

<!ATTLIST viewer

id         CDATA #REQUIRED

class      CDATA #REQUIRED

extensions CDATA #IMPLIED

label      CDATA #IMPLIED

>

  • id - a unique identifier that can be used to reference the viewer
  • class - a fully qualified name of a class that implements a factory for the content merge viewer and implements org.eclipse.compare.IViewerCreator
  • extensions - a comma separated list of file extensions e.g. "java, gif"
  • label - Since 3.5. A translatable label that will be used in the UI for this viewer.

<!ELEMENT contentTypeBinding EMPTY>

<!ATTLIST contentTypeBinding

contentTypeId        IDREF #REQUIRED

contentMergeViewerId IDREF #REQUIRED

>

A contentTypeBinding binds a merge viewer to a content type.


  • contentTypeId - The id of a content type defined using the org.eclipse.core.contenttype.contentTypes extension point.
  • contentMergeViewerId - The id of a merge viewer defined using the viewer element of this extension point (i.e. org.eclipse.compare.contentMergeViewers)

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> 

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


Copyright (c) 2000, 2009 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v10.html


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire