Package org.eclipse.emf.compare.diff

## Interface IDiffProcessor

All Known Implementing Classes:
  `DiffBuilder`

    public interface IDiffProcessor

An `IDiffProcessor` is meant to be used in order to react to the detection of differences by the diff engine.

The default implementation of a Diff engine only detects the changes and sends them over to its `IDiffProcessor`. It will then be up to the diff processor to create a `Diff` and attach it to the provided `Match`, simply react to the notification... or ignore it altogether.

`DiffBuilder`, a default implementation of this interface, can be subclassed instead.

See Also:
  `DiffBuilder`

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `attributeChange​(Match match, EAttribute attribute, Object value, DifferenceKind kind, DifferenceSource source)` This will be called whenever the diff engine detected a difference for a given attribute value.
`void` `featureMapChange​(Match match, EAttribute attribute, Object value, DifferenceKind kind, DifferenceSource source)` This will be called whenever the diff engine detected a difference for a given attribute value.
`void` `referenceChange​(Match match, EReference reference, EObject value, DifferenceKind kind, DifferenceSource source)` This will be called whenever the Diff engine detected a difference for a given reference value.
`void` `resourceAttachmentChange​(Match match, String uri, DifferenceKind kind, DifferenceSource source)` This will be called whenever the diff engine detected the addition (or removal) of a root in a given Resource.
`void` `resourceLocationChange​(MatchResource matchResource, String baseLocation, String changedLocation, DifferenceKind kind, DifferenceSource source)` This will be called whenever the diff engine detects the change of a Resource location.

### Method Detail

#### referenceChange

    void referenceChange​(Match match,
                         EReference reference,
                         EObject value,
                         DifferenceKind kind,
                         DifferenceSource source)

This will be called whenever the Diff engine detected a difference for a given reference value.

Parameters:
  `match` - The match to which this difference should be attached.
  `reference` - The reference on which we detected a difference.
  `value` - The actual value for which we detected a difference.
  `kind` - Kind of the detected difference.
  `source` - Source of the detected difference. For two way comparisons, this will always be `DifferenceSource.LEFT`. Otherwise, this will indicate the side on which this difference has been detected.

#### attributeChange

    void attributeChange​(Match match,
                         EAttribute attribute,
                         Object value,
                         DifferenceKind kind,
                         DifferenceSource source)

This will be called whenever the diff engine detected a difference for a given attribute value.

Parameters:
  `match` - The match to which this difference should be attached.
  `attribute` - The attribute on which we detected a difference.
  `value` - The actual value for which we detected a difference.
  `kind` - Kind of the difference.
  `source` - Source of the difference. For two way comparisons, this will always be `DifferenceSource.LEFT`. Otherwise, this will indicate the side on which this difference has been detected.

#### featureMapChange

    void featureMapChange​(Match match,
                          EAttribute attribute,
                          Object value,
                          DifferenceKind kind,
                          DifferenceSource source)

This will be called whenever the diff engine detected a difference for a given attribute value.

Parameters:
  `match` - The match to which this difference should be attached.
  `attribute` - The EFeatureMapEntry attribute on which we detected a difference.
  `value` - The actual FeatureMap.Entry value for which we detected a difference.
  `kind` - Kind of the difference.
  `source` - Source of the difference. For two way comparisons, this will always be `DifferenceSource.LEFT`. Otherwise, this will indicate the side on which this difference has been detected.
Since:
  3.2

#### resourceAttachmentChange

    void resourceAttachmentChange​(Match match,
                                  String uri,
                                  DifferenceKind kind,
                                  DifferenceSource source)

This will be called whenever the diff engine detected the addition (or removal) of a root in a given Resource.

Parameters:
  `match` - The match to which this difference should be attached.
  `uri` - The uri of the resource we attached this element to in case of an `DifferenceKind.ADD` , or the uri of the resource it was attached to in case of a `DifferenceKind.DELETE` difference.
  `kind` - Kind of this difference.
  `source` - Source of the difference. For two way comparisons, this will always be `DifferenceSource.LEFT`. Otherwise, this will indicate the side on which this difference has been detected.

#### resourceLocationChange

    void resourceLocationChange​(MatchResource matchResource,
                                String baseLocation,
                                String changedLocation,
                                DifferenceKind kind,
                                DifferenceSource source)

This will be called whenever the diff engine detects the change of a Resource location.

Parameters:
  `matchResource` - The matchResource to which this difference should be attached.
  `baseLocation` - The base location (left side in case of a two way comparison, origin or left side in case of a three way comparison).
  `changedLocation` - The change location (right side in case of a two way comparison, left or right side in case of a three way comparison).
  `kind` - Kind of this difference.
  `source` - Source of the difference. For two way comparisons, this will always be `DifferenceSource.LEFT`. Otherwise, this will indicate the side on which this difference has been detected.