Package org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups

## Interface IDifferenceGroupProvider

All Superinterfaces:
  `Adapter`

All Known Subinterfaces:
  `IDifferenceGroupProvider2`

All Known Implementing Classes:
  `AbstractDifferenceGroupProvider`, `ByResourceGroupProvider`, `DefaultGroupProvider`, `EmptyDifferenceGroupProvider`, `KindGroupProvider`, `ThreeWayComparisonGroupProvider`

    public interface IDifferenceGroupProvider
    extends Adapter

Instances of this class will be used by EMF Compare in order to provide difference grouping facilities to the structural differences view.

Since:
  4.0

### Nested Class Summary

Nested Classes
`static class` `IDifferenceGroupProvider.ComparisonType` Type of comparison a `IDifferenceGroupProvider` can handle.
`static interface` `IDifferenceGroupProvider.Descriptor` A descriptor that can create adifference group provider.

### Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter

`Adapter.Internal`

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `dispose()` Dispose this difference group provider.
`Collection<? extends IDifferenceGroup>` `getGroups​(Comparison comparison)` This will be called internally by the grouping actions in order to determine how the differences should be grouped in the structural view.
`List<TreeNode>` `getTreeNodes​(EObject eObject)` Returns all `TreeNode`s that are wrapping the given `eObject`.
`boolean` `isEnabled​(IComparisonScope scope, Comparison comparison)` Returns the activation condition based on the scope and comparison objects.

### Methods inherited from interface org.eclipse.emf.common.notify.Adapter

`getTarget, isAdapterForType, notifyChanged, setTarget`

### Method Detail

#### getGroups

    Collection<? extends IDifferenceGroup> getGroups​(Comparison comparison)

This will be called internally by the grouping actions in order to determine how the differences should be grouped in the structural view.

Parameters:
  `comparison` - The comparison which is to be displayed in the structural view. By default, its containment tree will be displayed.
Returns:
  The collection of difference groups that are to be displayed in the structural viewer. An empty group will not be displayed at all. If `null`, we'll fall back to the default behavior.

#### isEnabled

    boolean isEnabled​(IComparisonScope scope,
                      Comparison comparison)

Returns the activation condition based on the scope and comparison objects.

Parameters:
  `scope` - The scope on which the group provider will be applied.
  `comparison` - The comparison which is to be displayed in the structural view.
Returns:
  The activation condition based on the scope and comparison objects.

#### dispose

    void dispose()

Dispose this difference group provider.

#### getTreeNodes

    List<TreeNode> getTreeNodes​(EObject eObject)

Returns all `TreeNode`s that are wrapping the given `eObject`. It internally use a cross reference adapter.

Parameters:
  `eObject` - the object from which we want inverse reference.
Returns:
  all `TreeNode`s targeting the given `eObject` through `TreePackage.Literals.TREE_NODE__DATA`.