Package org.eclipse.emf.compare.merge

# Interface IMerger.Registry

All Known Subinterfaces:
  `IMerger.Registry2`

All Known Implementing Classes:
  `IMerger.RegistryImpl`

Enclosing interface:
  `IMerger`

public static interface IMerger.Registry
This will hold all registered mergers. Mergers can be registered manually in the registry, but they are usually registered through the "org.eclipse.emf.compare.ide.mergerExtension" extension point.

An instance of the registry is usually accessed through "EMFCompareIDEPlugin.getDefault().getMergerRegistry()". However, if you need an instance of the registry in a standalone environment, you should use "IMerger.RegistryImpl.createStandaloneInstance()" so that the default registrations are taken care of.

## Method Summary

Modifier and Type
Method
Description
`IMerger`
`add(IMerger merger)`
Adds a merger to the registry.
`void`
`clear()`
Clear the registry.
`IMerger`
`getHighestRankingMerger(Diff target)`
Returns the merger, for the given target, owning the highest ranking.
`Collection<IMerger>`
`getMergers(Diff target)`
Returns the list of the candidate mergers for the given difference.
`IMerger`
`remove(String className)`
Removes a merger from the registry, from its class name.

## Method Details

### getHighestRankingMerger

IMerger getHighestRankingMerger(Diff target)
Returns the merger, for the given target, owning the highest ranking.

Parameters:
  `target` - The given target difference.
Returns:
  The found merger.

### getMergers

Collection<IMerger> getMergers(Diff target)
Returns the list of the candidate mergers for the given difference. If the given difference is null, return all known mergers.

Parameters:
  `target` - The given difference.
Returns:
  The list of the found mergers.

### add

IMerger add(IMerger merger)
Adds a merger to the registry.

Parameters:
  `merger` - The merger.
Returns:
  The previously registered merger.

### remove

IMerger remove(String className)
Removes a merger from the registry, from its class name.

Parameters:
  `className` - The class name.
Returns:
  The previously registered merger.

### clear

void clear()
Clear the registry.