Compare Filters

This extension point is internal

Identifier:
org.eclipse.compare.compareFilters

Since:
[Enter the first release in which this extension point appears.]

Description:
This extension point is for internal use only.
This extension point allows a plug-in to register a compare filter for specific content types. The filter will be exposed as a toggle action in the compare viewer and can be used to customize how differences are calculated when comparing documents as well as affect the calculation of structural differences. The extension point must implement the interface org.eclipse.compare.ICompareFilter. For the filter to affect the calculation of structural differences, the structure creator must extend org.eclipse.compare.structuremergeviewer.StructureCreator.

Configuration Markup:

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

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>

Internal use only



<!ELEMENT filter EMPTY>

<!ATTLIST filter

id                           CDATA #REQUIRED

definitionId                 IDREF #IMPLIED

extensions                   CDATA #IMPLIED

class                        CDATA #REQUIRED

filter.label                 CDATA #REQUIRED

filter.tooltip               CDATA #REQUIRED

filter.tooltip.checked       CDATA #IMPLIED

filter.tooltip.unchecked     CDATA #IMPLIED

filter.description           CDATA #REQUIRED

filter.description.checked   CDATA #IMPLIED

filter.description.unchecked CDATA #IMPLIED

filter.image                 CDATA #IMPLIED>

Internal use only



<!ELEMENT contentTypeBinding EMPTY>

<!ATTLIST contentTypeBinding

contentTypeId IDREF #REQUIRED

filterId      IDREF #REQUIRED>

Internal use only.
A contentTypeBinding binds a compare filter to a content type.



Examples:
The following is an example of a compare filter for example files (extensions ".example" and ".example2") and the text content type:


<extension
         point="org.eclipse.compare.compareFilters">
      <filter
           id="com.example.IgnorePrefixId"
            class="com.example.IgnorePrefix"
            extensions="example,example2"
            definitionId="com.example.IgnorePrefixCommand"
            filter.description="Ignore Columns 1-6"
            filter.label="Ignore Prefix"
            filter.image="/icons/ignorePrefix.gif"
            filter.tooltip="Ignore Prefix">
      </filter>
      <contentTypeBinding
  contentTypeId="org.eclipse.core.runtime.text"
  filterId="com.example.IgnorePrefixId">
   </contentTypeBinding>
   </extension>

API Information:
The contributed class must implement org.eclipse.compare.ICompareFilter. For the filter to affect the calculation of structural differences, the structure creator must extend org.eclipse.compare.structuremergeviewer.StructureCreator.

Supplied Implementation:
[Enter information about supplied implementation of this extension point.]


Copyright (c) 2013 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 http://www.eclipse.org/legal/epl-v10.html