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

# Class StructureMergeViewerGrouper

java.lang.Object
org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.StructureMergeViewerGrouper

public final class StructureMergeViewerGrouper extends Object
This class will be used by the EMF Compare UI to group differences together in the structural differences tree viewer.

Since:
  4.0

## Constructor Summary

Constructors
Constructor
Description
`StructureMergeViewerGrouper(com.google.common.eventbus.EventBus eventBus)`
Constructs the difference grouper.

## Method Summary

Modifier and Type
Method
Description
`IDifferenceGroupProvider`
`getProvider()`
Get the `IDifferenceGroupProvider` associated to this StructureMergeViewerGrouper.
`void`
`install(org.eclipse.jface.viewers.StructuredViewer viewer)`
Install this grouper on the given viewer.
`protected void`
`registerDifferenceGroupProvider(Notifier notifier, IDifferenceGroupProvider groupProvider)`
Registers the selected IDifferenceGroupProvider to the given Notifier.
`void`
`setProvider(IDifferenceGroupProvider provider)`
Sets the instance that will provide the groups to be displayed in the structural differences view.
`void`
`uninstall(org.eclipse.jface.viewers.StructuredViewer viewer)`
Uninstall this grouper from the given viewer.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### StructureMergeViewerGrouper

public StructureMergeViewerGrouper(com.google.common.eventbus.EventBus eventBus)
Constructs the difference grouper.

Parameters:
  `eventBus` - The `EventBus` which will be associated with this difference grouper.

## Method Details

### setProvider

public void setProvider(IDifferenceGroupProvider provider)
Sets the instance that will provide the groups to be displayed in the structural differences view.

Parameters:
  `provider` - The provider that will be use to compute the groups that are to be displayed in the UI.

### getProvider

public IDifferenceGroupProvider getProvider()
Get the `IDifferenceGroupProvider` associated to this StructureMergeViewerGrouper.

Returns:
  the provider associated to this StructureMergeViewerGrouper

### registerDifferenceGroupProvider

protected void registerDifferenceGroupProvider(Notifier notifier, IDifferenceGroupProvider groupProvider)
Registers the selected IDifferenceGroupProvider to the given Notifier.

Parameters:
  `notifier` - the given Notifier.
  `groupProvider` - the selected IDifferenceGroupProvider.

### install

public void install(org.eclipse.jface.viewers.StructuredViewer viewer)
Install this grouper on the given viewer.

Note that this will also install a dispose listener on that viewer in order to remove the grouper whenever the viewer is disposed.

Parameters:
  `viewer` - The viewer on which the grouper will be installed.

### uninstall

public void uninstall(org.eclipse.jface.viewers.StructuredViewer viewer)
Uninstall this grouper from the given viewer.

Parameters:
  `viewer` - The viewer from which the grouper should be removed.