Content Viewers Identifier:
org.eclipse.compare.contentViewers
Description:
This extension point allows a plug-in to register viewers for specific content types. These viewers are used in the EditionSelectionDialog when presenting an edition of a resource or a subsection thereof. 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>
- 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 viewer and implements org.eclipse.compare.IViewerCreator
- extensions - a comma separated list of file extensions e.g. "java, gif"
<!ELEMENT contentTypeBinding EMPTY>
<!ATTLIST contentTypeBinding
contentTypeId CDATA #REQUIRED
contentViewerId CDATA #REQUIRED>
- contentTypeId -
- contentViewerId -
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>
API Information:
The contributed class must implement org.eclipse.compare.IViewerCreatorSupplied Implementation:
The Compare UI plugin defines content viewers for text and images.
Copyright (c) 2000, 2004 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/cpl-v10.html